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



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



Other Threads

1. am i using these correctly? AbsListView.layoutparams

Hi,
So listview is on of those.components used all over the OS and has all
those tricks to speed it up and in a lot of cases, work correctly. So
let's say I have an adapter that supports N views.

GetViewTypeCount() returns N.
GetItemViewType() return [0, (N - 1)]

Now the interesting part getView
All the examples I see have something like this.
...
layoutInflater.inflate(R.layout.awesome);

As the base view to return if the convert view is empty. This seems to
convert to the correct layout parameter. but the generate layout
parameter in listview only copies width and height it seems. If the
adapter returns multiple views, should we then reset the view's layout
parameters to use laayoutparams( width, height, viewType) before
returning it in getView ( where viewType is the same as the value
returned by getItemViewType for the position being rendered )?

-- 

2. Audio

Hi,

Has anyone gotten audio routing to work succesfully on eclair?
SetRouting and a number of functions don't work anymore.

-- 

3. init.rc commands not interprete

4. what are the contents of the en.us/*.par files?

5. init.rc commands not interpreted

6. getFromLocationName Service Not Available

7. accessing contentprovider