Touch GFX 'Status Bar' at Top of all views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-09 11:48 AM
Hi, I want to know how to implement a 'status bar' type view that is at the top of all views, that contains things like battery level etc. similar to that found in something like Android or iOS.
In the touch GFX documentation it mentions it briefly but does not elaborate much on how to implement this in code:
"If for instance all your screens need to display a status bar at the top, showing current time, battery level, et cetera you can create a base view class containing the status bar only and have all your views deriving from this class, so you get the status bar functionality automatically"
I assume this means to make a seperate view that is just the status bar which I have done, but how do I instantiate this in every other view?
- Labels:
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-22 02:53 AM
This is not directly supported by the designer yet. But it's a great feature to have. Give me some more time to prepare an example of how this can be achieved in source code (Swamped here!).
Some have suggested to use a custom container and insert this into every view that requires it, but a better approach would be to have a shared presenter (For general access to the model for things that related to a view group) and a shared view for shared ui components like a top bar.
/Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-05 03:16 AM
Hi Martin,
Was there an example posted anywhere for this?
Would the proposed View+Presenter be manual and not created via the designer?
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-05 04:29 AM
Yes, i did post an example a while back. Try searching for "BaseView" - let me know if you can dig it out.
/Martin