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. Clarification on loading local images with WebView



As I wrote in my previous reply:

Try creating a ContentProvider to serve the image, and see if you have
better luck with a content:// URL.


Not if your image is only in an asset. The image viewer won't have
rights to access it.


Not directly, but you can use the 2D graphics API (e.g., Canvas and
friends). Basically, you're looking to use the same techniques games do
to view a portion of a large map, for example.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Online Training: 21-25 June 2010: http://onlc.com

-- 

2. Clarification on loading local images with WebView

Hello all,
I apologize if this is beating a dead horse, but I have been through
the documentation and groups discussions over and over, and can't seem
to resolve this issue....

What I want to do:
- I am loading a remote web page into WebView using loadUrl() -
example:  webView.loadUrl("http://myserver.com/page.html");
- That page has a very large image in it whose quality I do not want
degraded by the OS. So I am putting it in the assets directory of the
app.
- The page.html that gets downloaded from my server, then has a
regular img tag in it like so:
<img src="file:///android_asset/largeimage.png"/>

I know there were some issues with reading assets from the file system
with different versions of the platform. But its not clear what
versions this affects and how to address the problem for all versions.
Can someone please clarify:

A) should what I am doing above work (because its not)

B) If it only works on some versions of the platform - which versions?
How should this be addressed when I can't guarantee what version of
the platform users are running?

I am targeting version 1.6 in my app because I thought that would be a
"safe" version to target. I am testing against version 2.0.1

Thanks,
Jeff

-- 

3. broken pipe over ssl

4. Internet data request done via ContentProvider?

5. About layout

6. how to test touchscreen drive

7. Animating Views with custom layout