Loading New Data with Back Button

by apple.developer27 » Mon, 13 Apr 2009 12:08:20 GMT


Sponsored Links
 I have a message application so that on view 1 is displayed a list of
messages and when you go to view 2 (subactivity) you can send a
message.  I want the program to work so that when you hit the android
back button, you can go back to view 1 and see the list of messages
including the new message.  Right now only the old data is displayed,
and I noticed that displayContent() is not called when going back
which I assumed it would.  Is there any way to specify that when the
back button is hit, to call displayContent() again on the previous
activity?

--~--~---------~--~----~------------~-------~--~----~



Loading New Data with Back Button

by apple.developer27 » Mon, 13 Apr 2009 12:08:27 GMT


 I have a message application so that on view 1 is displayed a list of
messages and when you go to view 2 (subactivity) you can send a
message.  I want the program to work so that when you hit the android
back button, you can go back to view 1 and see the list of messages
including the new message.  Right now only the old data is displayed,
and I noticed that displayContent() is not called when going back
which I assumed it would.  Is there any way to specify that when the
back button is hit, to call displayContent() again on the previous
activity?

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Loading New Data with Back Button

by Marco Nelissen » Mon, 13 Apr 2009 12:28:58 GMT


 If 'view 2' is another activity, then the onResume() of 'view1' will
be called after pressing the back button, so you could simply
redisplay your data there.


On Fri, Apr 10, 2009 at 7:16 PM, apple.developer27



--~--~---------~--~----~------------~-------~--~----~