My Activity doesn't update itself

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

My Activity doesn't update itself

Postby gskbyte » Mon Jan 18, 2010 2:06 am

Hi! I'm having a problem and need some help:

I have an activity that calls a dialog (an AlertDialog with customized Layout) to add items to a list (displayed via a ListView). When I create an item, the activity doesn't refresh itself and I have to press back int he pone/simulator and return to it to see the changes.

Is there any way to force Activity redrawing? May it be a problem in the ListView Adapter? I can post some code if necessary, thank you very much!
gskbyte
Experienced Developer
Experienced Developer
 
Posts: 52
Joined: Tue Jan 12, 2010 1:51 pm

Top

Postby jwei512 » Mon Jan 18, 2010 10:26 am

you are going to want to call the notifyDataSetChange() method for the ListView adapter. This will automatically refresh the list once the dialog closes.
- jwei

http://thinkandroid.wordpress.com
Examples, Code, and Tutorials
jwei512
Senior Developer
Senior Developer
 
Posts: 135
Joined: Mon Jul 27, 2009 9:35 pm
Location: Palo Alto, CA

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests