cancel
Showing results for 
Search instead for 
Did you mean: 

Touch GFX 'Status Bar' at Top of all views

savvn001
Associate II

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?

3 REPLIES 3
Martin KJELDSEN
Chief III

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

Hi Martin,

Was there an example posted anywhere for this?

Would the proposed View+Presenter be manual and not created via the designer?

Cheers

Yes, i did post an example a while back. Try searching for "BaseView" - let me know if you can dig it out.

/Martin