Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2
This is the forum to discuss the Wrox book Professional Android Application Development by Reto Meier; ISBN: 9780470344712
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 25th, 2009, 10:17 AM
Registered User
 
Join Date: Jun 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chater 6 Earthquake -Clear adapter

problem:
1- after a while the program will crash
2- only a greater magnitude refresh the earthquake list

solution:
1- Clear aa adapter

Code:
 
     if (requestCode == SHOW_PREFERENCES) {
      if (resultCode == Activity.RESULT_OK) {
       // Clear Adapter
       aa.clear();
       updateFromPreferences();
       refreshEarthquakes();
      }
Code:
     switch (item.getItemId()) {
         case (MENU_UPDATE) : {
           //  Clear Adapter.
           aa.clear();
 
         refreshEarthquakes();
          return true;
         }
         case (MENU_PREFERENCES) : {
            ...
                         ...
         }
     }
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 Earthquake using Provider abowman BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 March 9th, 2009 05:19 PM
Chapter 6 Sample Earthquake 2 sunrain BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 2 January 31st, 2009 04:06 PM
Earthquake Example problem "non-application token" Langley BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 2 January 28th, 2009 02:29 PM
Help with my custom adapter SinStereo Biztalk 1 March 23rd, 2006 06:17 AM
Adapter for SQL erisa Biztalk 3 February 25th, 2004 09:28 AM



All times are GMT -4. The time now is 09:24 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.