Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e14b5b302b
1 changed files with 11 additions and 3 deletions
|
@ -621,10 +621,10 @@ public class MapActivity extends AccessibleActivity {
|
||||||
uiHandler.sendMessageDelayed(msg, LONG_KEYPRESS_DELAY);
|
uiHandler.sendMessageDelayed(msg, LONG_KEYPRESS_DELAY);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if (keyCode == KeyEvent.KEYCODE_MENU && event.getRepeatCount() == 0) {
|
} else if (keyCode == KeyEvent.KEYCODE_MENU && event.getRepeatCount() == 1) {
|
||||||
openDrawer();
|
toggleDrawer();
|
||||||
return true;
|
return true;
|
||||||
} else if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getRepeatCount() == 0) {
|
} else if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getRepeatCount() == 1) {
|
||||||
Intent newIntent = new Intent(MapActivity.this, getMyApplication().getAppCustomization()
|
Intent newIntent = new Intent(MapActivity.this, getMyApplication().getAppCustomization()
|
||||||
.getSearchActivity());
|
.getSearchActivity());
|
||||||
// causes wrong position caching: newIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
// causes wrong position caching: newIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||||
|
@ -982,4 +982,12 @@ public class MapActivity extends AccessibleActivity {
|
||||||
public void closeDrawer() {
|
public void closeDrawer() {
|
||||||
drawerLayout.closeDrawer(Gravity.LEFT);
|
drawerLayout.closeDrawer(Gravity.LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void toggleDrawer() {
|
||||||
|
if (drawerLayout.isDrawerOpen(Gravity.LEFT)) {
|
||||||
|
closeDrawer();
|
||||||
|
} else {
|
||||||
|
openDrawer();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue