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) : {
...
...
}
}