Added calling slide menu for another control

This commit is contained in:
Denis 2014-08-06 15:09:00 +03:00
parent d27d299271
commit 469fd8fd40
2 changed files with 5 additions and 3 deletions

View file

@ -725,8 +725,8 @@ public class MapActivityActions implements DialogProvider {
public void openOptionsMenuAsDrawer(){
final ContextMenuAdapter cm = createOptionsMenu();
DrawerLayout mDrawerLayout = (DrawerLayout) mapActivity.findViewById(R.id.drawer_layout);
ListView mDrawerList = (ListView) mapActivity.findViewById(R.id.left_drawer);
final DrawerLayout mDrawerLayout = (DrawerLayout) mapActivity.findViewById(R.id.drawer_layout);
final ListView mDrawerList = (ListView) mapActivity.findViewById(R.id.left_drawer);
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
ListAdapter listAdapter ;
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB){
@ -751,6 +751,7 @@ public class MapActivityActions implements DialogProvider {
if (click != null) {
click.onContextMenuClick(cm.getItemId(which), which, false, null);
}
mDrawerLayout.closeDrawer(mDrawerList);
}
});

View file

@ -26,7 +26,8 @@ public class SmallMapMenuControls extends MapControls {
@Override
public void onClick(View v) {
notifyClicked();
mapActivity.getMapActions().openOptionsMenuAsList();
mapActivity.getMapActions().openOptionsMenuAsDrawer();
//mapActivity.getMapActions().openOptionsMenuAsList();
}
});
}