2021-09-22 06:42 AM
Hi everyone,
I'm currently working on a project where the device has to continuously read files from USB but where a user can also plug the device into a computer and mount it as a USB device to transfer and delete files and what-not.
Now, I can detect when external power is plugged-in and want to show the user a modal dialog where they can choose what should happen next - "USB device mode" or "Standalone mode + charging".
This modal dialog, however, should be shown on (or be reachable from) each and every screen within the application.
Now, I came across two different solutions, both of which I do not particularly like:
Is there any better way I am currently unaware of? What am I missing here?
Thanks in advance.
2021-11-15 02:23 AM
Hi, i'm facing same problem/doubts...
At the end, what solution did you choosed of above listed?... Or did you found a better solution?..
Thnx and regards.
2021-11-15 10:56 PM
Hi Roberto,
finally, I selected the second option above with a dedicated "mode selection" screen, since I figured for my application it is not critical to return to the previous screen in all cases. So, I store some of the more important screens as the previous one and for others I do not really care to restore them and select the home screen as a default screen to return to. Hope this helps.
Best Regards
2021-11-15 11:23 PM
Ok, thnx!
2021-12-01 11:05 AM
Hello, I am having exactly the same problem and the same questions... Any help?
2021-12-02 03:22 AM
Hi,
I'm not so expert with TouchGFX, so the only solution i found (for my application) it was to create a Modal window in all windows that need to support (i had just 3 screen that required). If more screens btw I think that solution proposed by M-Shiller it's the simplest and better then mine.
Best Regards
2021-12-02 03:41 AM
Hello, but in my case, I really need to use the Modal window, so M-Shiller solution is not good for me.
My current solution is to create a Popup class (ModalWIndow) and add it manually by heritage to all the screens, but the application is getting bigger and I think it's not a good approach because ill have a lot of duplicated code.
I was wondering if I can use some common class to add the modaWindow custom container to all the screen, not sure if I can make it with the Front end application class
2022-04-20 03:00 AM
AFAIK, there is no point in the inheritance hierarchy that reliably supports adding code to all Views.