2024-09-24 05:14 AM
Hello, I was hoping for some help on which way to use a keyboard on TouchGFX. It will be the same keyboard from the example provided by TouchGFX. My application has multiple screens (10-12) where it uses a keyboard. Would it be more efficient memory/gpu wise to
I was a bit confused because I know it takes resources for the screen to draw the keyboard images and the mappings, so I thought using one screen would be more efficient. But, TouchGFX loses the state and destroys the screen that it leaves, meaning using one screen would be constant redraws, not to mention carrying over state and managing buffers so the keyboard can send data back to the screen where user came from
Is there a "norm" when it comes to using keyboard on TouchGFX?
Solved! Go to Solution.
2024-09-24 06:29 AM
Hello @Priyank and welcome to the community! :smiling_face_with_smiling_eyes:
Both options are viable.
I assume you have a small screen so that the keyboard would take most of the space. In that case, the computing power required to invalidate and redraw the screen would be similar when changing to a completely different screen (option 2) and when invalidating most of the screen (option 1).
When you change screen you do "loose the current state". To fix that, you should store the state in the model.ccp file and use this state data to setup your screen properly when it is created/re-created.
Please find a tutorial here : Application with multiple screens
I hope this helps!
If this comment answers your question, I invite you to select it as "best answer".
Regards,
2024-09-24 06:29 AM
Hello @Priyank and welcome to the community! :smiling_face_with_smiling_eyes:
Both options are viable.
I assume you have a small screen so that the keyboard would take most of the space. In that case, the computing power required to invalidate and redraw the screen would be similar when changing to a completely different screen (option 2) and when invalidating most of the screen (option 1).
When you change screen you do "loose the current state". To fix that, you should store the state in the model.ccp file and use this state data to setup your screen properly when it is created/re-created.
Please find a tutorial here : Application with multiple screens
I hope this helps!
If this comment answers your question, I invite you to select it as "best answer".
Regards,
2024-09-24 09:14 AM
Thank you,
I am guessing applications such as mine are somewhat common. Do you know what best practice would be in this situation?
2024-09-26 02:04 AM
There is never an single answer to fit all projects. Each solution have ups and downs.
If you want something simple to design, just add the keyboard to each of the screen that uses it and set it visible or invisible as you need.
If you want to save memory, create a separate screen and use the MVP to propagate your datas.
Regards,
2024-10-18 07:17 AM
Hello @Priyank ,
Have you been able to move forward with your question?
Regards,
2024-10-21 09:13 AM
Yes, I have also just marked the accepted solution.
2024-10-30 07:46 AM
Hello @Priyank ,
I am glad you found a solution! :smiling_face_with_smiling_eyes:
Thank you for selecting a best answer.
Regards,