Reputation: 69
I am developing a chat application in blackberry. I have made a main screen which acts like the home screen of the application. Whenever application is started this screen appears first.
There are like 5 screens (1 Main screen and 4 other screens). My problem is..I want to update this 1 main screen when something happens on other 4 screens. Like For example, if I'm using the voice recording screen of my application. I have to add an icon to my main screen of the application indicating I have recorded a voice message after I have finished up.
I am not able to get the logic for doing this. Since I want to update a screen's UI which is already on stack, from a screen which is at the top of the stack.
And also, I want to keep those things at the main screen of the application whenever I start my application(just like history of the activities).
please help.
Upvotes: 0
Views: 179
Reputation: 1854
Read this article: http://berrytutorials.blogspot.com/2009/12/blackberry-threads-dynamically-update.html
It shows how to update UI from different thread using Observer Design pattern. But you can use same technique to update screen from different screens.
Upvotes: 1
Reputation:
Take a look at MVC design pattern.
Implement screens as Views which get notified when data model changed.
Upvotes: 1