Try more central fix in DashBaseFragment

This commit is contained in:
sonora 2015-01-01 11:46:01 +01:00
parent 41e5eb84f7
commit 9f300e2754
3 changed files with 17 additions and 6 deletions

View file

@ -165,6 +165,7 @@ public class MainMenuActivity extends BaseDownloadActivity implements OsmAndLoca
}
getLocationProvider().addCompassListener(this);
getLocationProvider().registerOrUnregisterCompassListener(true);
ScrollView.invalidate();
}
@Override
@ -177,10 +178,10 @@ public class MainMenuActivity extends BaseDownloadActivity implements OsmAndLoca
// getLocationProvider().resumeAllUpdates();
}
View view = getView();
if (view != null) {
view.invalidate();
}
//View view = getView();
//if (view != null) {
// view.invalidate();
//}
}
@Override

View file

@ -12,4 +12,14 @@ public class DashBaseFragment extends SherlockFragment {
return (OsmandApplication) getActivity().getApplication();
}
@Override
public void onResume() {
super.onResume();
//Test if this works
View view = getView();
if (view != null) {
view.invalidate();
}
}
}

View file

@ -70,7 +70,7 @@ public class DashUpdatesFragment extends DashBaseFragment {
}
updatedDownloadsList(BaseDownloadActivity.downloadListIndexThread.getItemsToUpdate());
//This seems to fix the "list are empty when returning to Dashboard" issue, but should probably be called more globally
//This seems to fix the "list are empty when returning to Dashboard" issue, but should probably be called more globally in MainMenuActivity or DashBaseFragment?
//View view = getView();
//if (view != null) {
// view.invalidate();