Added calling slide menu for another control
This commit is contained in:
parent
d27d299271
commit
469fd8fd40
2 changed files with 5 additions and 3 deletions
|
@ -725,8 +725,8 @@ public class MapActivityActions implements DialogProvider {
|
||||||
|
|
||||||
public void openOptionsMenuAsDrawer(){
|
public void openOptionsMenuAsDrawer(){
|
||||||
final ContextMenuAdapter cm = createOptionsMenu();
|
final ContextMenuAdapter cm = createOptionsMenu();
|
||||||
DrawerLayout mDrawerLayout = (DrawerLayout) mapActivity.findViewById(R.id.drawer_layout);
|
final DrawerLayout mDrawerLayout = (DrawerLayout) mapActivity.findViewById(R.id.drawer_layout);
|
||||||
ListView mDrawerList = (ListView) mapActivity.findViewById(R.id.left_drawer);
|
final ListView mDrawerList = (ListView) mapActivity.findViewById(R.id.left_drawer);
|
||||||
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
|
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
|
||||||
ListAdapter listAdapter ;
|
ListAdapter listAdapter ;
|
||||||
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB){
|
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB){
|
||||||
|
@ -751,6 +751,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
if (click != null) {
|
if (click != null) {
|
||||||
click.onContextMenuClick(cm.getItemId(which), which, false, null);
|
click.onContextMenuClick(cm.getItemId(which), which, false, null);
|
||||||
}
|
}
|
||||||
|
mDrawerLayout.closeDrawer(mDrawerList);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,8 @@ public class SmallMapMenuControls extends MapControls {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
notifyClicked();
|
notifyClicked();
|
||||||
mapActivity.getMapActions().openOptionsMenuAsList();
|
mapActivity.getMapActions().openOptionsMenuAsDrawer();
|
||||||
|
//mapActivity.getMapActions().openOptionsMenuAsList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue