03-24-2014 06:58 AM
In my app I have created one common bottombar for all scrrens same as e.g of buttonField given in below link.
I have added one guage,labelfield for displaying timer,play and pause button image which is added in one horizontalfieldmanager . This manager is common for all screens. When i click on any song . Song is getting play
and guage is moving accordingly.
My problem is that when i play any song from one screen as A screen all works perfectly(as guage is moving,label showing correct time). But when i pop current scrren (i.e A). Screen below as e.g B getting displayed . But the contents of this is not getting refresh.
Thanks in Advance
Solved! Go to Solution.
03-24-2014 08:07 AM
Fields can only be displayed in one screen at a time - they only have one Manager. So if you have two screens both with bottombars, then you have two different bottombars.
Presumably you have, in Screen A, set up a call back of some other 'wiring' to update the contents of the bottombar in that Screen. When you swap to Screen B, it has a different bottombar which is not wired up.
AFAIK, you have two possible solutions:
a) Change your processing so that when you swap from Screen A to Screen B, you remove the bottombar from Screen A and use it in Screen B. SImilarly when you pop Screen B to return to Screen A, you update the bottom bar again.
b) Alternatively have just one screen, and instead of swapping screens to go from A to B, swap the contents of the screen. One option is to have a VFM A and VFM B, so swapping from screen A to screen B involves removing VFM A and adding VFM B.
It is not possible for me to help you choose which of these two methods will be best for you, as it depends on the application and how you are trying to write it.
03-24-2014 08:33 AM
Solution b will not works for me because i have added same bottom player in multiple screens(more than 10 screens).
If i go through solution a then my concerns is that how to get current instance of bottmplayer to delete or add.
Please provide any solution for the same.
03-24-2014 09:29 AM
"how to get current instance of bottmplayer to delete or add"
Sorry I don't understand why this is a problem.
In the first screen that is displayed you will create it and have a reference to it. This same reference will be passed to the other screens.
03-25-2014 07:45 AM
I have gone through solution a and it works. Previously i confused so i asked about current instance . But no need of that i have deleted hfm before calling add method .