Prior fix worked only sometimes, unclear why

This commit is contained in:
sonora 2015-01-01 13:02:24 +01:00
parent 4ae7acd3f4
commit 6130ec93d4
2 changed files with 12 additions and 0 deletions

View file

@ -57,6 +57,12 @@ public class FavouritesListFragment extends SherlockListFragment implements Sear
OsmandApplication app = (OsmandApplication) getApplication(); OsmandApplication app = (OsmandApplication) getApplication();
favouritesAdapter = new FavouritesAdapter(activity, app.getFavorites().getFavouritePoints()); favouritesAdapter = new FavouritesAdapter(activity, app.getFavorites().getFavouritePoints());
setListAdapter(favouritesAdapter); setListAdapter(favouritesAdapter);
//Ckeck if this fixes that lists are still sometimes empty when returning from the map screen
View view = getView();
if (view != null) {
view.invalidate();
}
} }
private OsmandApplication getApplication() { private OsmandApplication getApplication() {

View file

@ -58,6 +58,12 @@ public class DashUpdatesFragment extends DashBaseFragment {
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
//Ckeck if this fixes that lists are still sometimes empty when returning from the map screen
View view = getView();
if (view != null) {
view.invalidate();
}
} }
@Override @Override