Fixed issue with drawer not showing when swype from left side first time
This commit is contained in:
parent
90b4c7f8f7
commit
3863a864aa
4 changed files with 10 additions and 6 deletions
|
@ -213,6 +213,8 @@ public class MapActivity extends AccessibleActivity {
|
||||||
((FrameLayout)mapView.getParent()).addView(lockView);
|
((FrameLayout)mapView.getParent()).addView(lockView);
|
||||||
}
|
}
|
||||||
gpxImportHelper = new GpxImportHelper(this, getMyApplication(), getMapView());
|
gpxImportHelper = new GpxImportHelper(this, getMyApplication(), getMapView());
|
||||||
|
|
||||||
|
mapActions.createOptionsMenuAsDrawer(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addLockView(FrameLayout lockView) {
|
public void addLockView(FrameLayout lockView) {
|
||||||
|
@ -466,7 +468,7 @@ public class MapActivity extends AccessibleActivity {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if (keyCode == KeyEvent.KEYCODE_MENU && event.getRepeatCount() == 0) {
|
} else if (keyCode == KeyEvent.KEYCODE_MENU && event.getRepeatCount() == 0) {
|
||||||
mapActions.openOptionsMenuAsDrawer();
|
mapActions.createOptionsMenuAsDrawer(true);
|
||||||
return true;
|
return true;
|
||||||
} else if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getRepeatCount() == 0) {
|
} else if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getRepeatCount() == 0) {
|
||||||
Intent newIntent = new Intent(MapActivity.this, getMyApplication().getAppCustomization().getSearchActivity());
|
Intent newIntent = new Intent(MapActivity.this, getMyApplication().getAppCustomization().getSearchActivity());
|
||||||
|
|
|
@ -723,7 +723,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openOptionsMenuAsDrawer(){
|
public void createOptionsMenuAsDrawer(boolean show){
|
||||||
final ContextMenuAdapter cm = createOptionsMenu();
|
final ContextMenuAdapter cm = createOptionsMenu();
|
||||||
final DrawerLayout mDrawerLayout = (DrawerLayout) mapActivity.findViewById(R.id.drawer_layout);
|
final DrawerLayout mDrawerLayout = (DrawerLayout) mapActivity.findViewById(R.id.drawer_layout);
|
||||||
final ListView mDrawerList = (ListView) mapActivity.findViewById(R.id.left_drawer);
|
final ListView mDrawerList = (ListView) mapActivity.findViewById(R.id.left_drawer);
|
||||||
|
@ -755,8 +755,10 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (show){
|
||||||
mDrawerLayout.openDrawer(mDrawerList);
|
mDrawerLayout.openDrawer(mDrawerList);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public AlertDialog openOptionsMenuAsList() {
|
public AlertDialog openOptionsMenuAsList() {
|
||||||
final ContextMenuAdapter cm = createOptionsMenu();
|
final ContextMenuAdapter cm = createOptionsMenu();
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class MapMenuControls extends MapControls {
|
||||||
// double lat = activity.getMapView().getLatitude();
|
// double lat = activity.getMapView().getLatitude();
|
||||||
// double lon = activity.getMapView().getLongitude();
|
// double lon = activity.getMapView().getLongitude();
|
||||||
// MainMenuActivity.backToMainMenuDialog(activity, new LatLon(lat, lon));
|
// MainMenuActivity.backToMainMenuDialog(activity, new LatLon(lat, lon));
|
||||||
mapActivity.getMapActions().openOptionsMenuAsDrawer();
|
mapActivity.getMapActions().createOptionsMenuAsDrawer(true);
|
||||||
notifyClicked();
|
notifyClicked();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class SmallMapMenuControls extends MapControls {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
notifyClicked();
|
notifyClicked();
|
||||||
//mapActivity.getMapActions().openOptionsMenuAsDrawer();
|
//mapActivity.getMapActions().openOptionsMenuAsDrawer();
|
||||||
mapActivity.getMapActions().openOptionsMenuAsDrawer();
|
mapActivity.getMapActions().createOptionsMenuAsDrawer(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue