Refresh dashboard
This commit is contained in:
parent
79b2d47ced
commit
96252736c4
2 changed files with 16 additions and 4 deletions
|
@ -208,7 +208,9 @@ public class MapActivity extends AccessibleActivity {
|
|||
System.err.println("OnCreate for MapActivity took " + (System.currentTimeMillis() - tm) + " ms");
|
||||
}
|
||||
mapView.refreshMap(true);
|
||||
|
||||
if(dashboardOnMap != null) {
|
||||
dashboardOnMap.updateLocation(true, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkAppInitialization() {
|
||||
|
@ -231,6 +233,9 @@ public class MapActivity extends AccessibleActivity {
|
|||
}
|
||||
if(event == InitEvents.MAPS_INITIALIZED) {
|
||||
mapView.refreshMap(true);
|
||||
if(dashboardOnMap != null) {
|
||||
dashboardOnMap.updateLocation(true, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,6 +245,9 @@ public class MapActivity extends AccessibleActivity {
|
|||
setupOpenGLView(false);
|
||||
}
|
||||
mapView.refreshMap(true);
|
||||
if(dashboardOnMap != null) {
|
||||
dashboardOnMap.updateLocation(true, true, false);
|
||||
}
|
||||
findViewById(R.id.init_progress).setVisibility(View.GONE);
|
||||
findViewById(R.id.drawer_layout).invalidate();
|
||||
}
|
||||
|
|
|
@ -152,12 +152,12 @@ public class DashTrackFragment extends DashBaseFragment {
|
|||
});
|
||||
ImageButton showOnMap = ((ImageButton) v.findViewById(R.id.show_on_map));
|
||||
showOnMap.setVisibility(View.VISIBLE);
|
||||
updateShowOnMap(app, f, showOnMap);
|
||||
updateShowOnMap(app, f, v, showOnMap);
|
||||
tracks.addView(v);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateShowOnMap(final OsmandApplication app, final File f, final ImageButton showOnMap) {
|
||||
private void updateShowOnMap(final OsmandApplication app, final File f, View v, final ImageButton showOnMap) {
|
||||
final GpxSelectionHelper selectedGpxHelper = app.getSelectedGpxHelper();
|
||||
final SelectedGpxFile selected = selectedGpxHelper.getSelectedFileByPath(f.getAbsolutePath());
|
||||
if(selected != null) {
|
||||
|
@ -166,7 +166,11 @@ public class DashTrackFragment extends DashBaseFragment {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
selectedGpxHelper.selectGpxFile(selected.getGpxFile(), false, false);
|
||||
updateShowOnMap(app, f, showOnMap);
|
||||
AvailableGPXFragment.GpxInfo info = new AvailableGPXFragment.GpxInfo();
|
||||
info.subfolder = "";
|
||||
info.file = f;
|
||||
AvailableGPXFragment.udpateGpxInfoView(v, info, app, true);
|
||||
updateShowOnMap(app, f, v, showOnMap);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue