Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-11-10 08:58:58 +01:00
commit 7f52b2e75f
3 changed files with 6 additions and 4 deletions

View file

@ -94,6 +94,7 @@ public class MapActivityActions implements DialogProvider {
private enum DrawerType{ private enum DrawerType{
WAYPOINTS, WAYPOINTS,
CONFIGURE_SCREEN,
CONFIGURE_MAP, CONFIGURE_MAP,
MAIN_MENU MAIN_MENU
} }
@ -816,6 +817,7 @@ public class MapActivityActions implements DialogProvider {
.listen(new OnContextMenuClick() { .listen(new OnContextMenuClick() {
@Override @Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) { public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
currentDrawer = DrawerType.CONFIGURE_MAP;
prepareConfigureMap(); prepareConfigureMap();
return false; return false;
} }
@ -825,7 +827,7 @@ public class MapActivityActions implements DialogProvider {
.listen(new OnContextMenuClick() { .listen(new OnContextMenuClick() {
@Override @Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) { public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
currentDrawer = DrawerType.CONFIGURE_MAP; currentDrawer = DrawerType.CONFIGURE_SCREEN;
ContextMenuAdapter cm = mapActivity.getMapLayers().getMapInfoLayer().getViewConfigureMenuAdapter(); ContextMenuAdapter cm = mapActivity.getMapLayers().getMapInfoLayer().getViewConfigureMenuAdapter();
prepareOptionsMenu(cm); prepareOptionsMenu(cm);
return false; return false;

View file

@ -102,7 +102,7 @@ public class AppModeDialog {
newButtons[buttons.length] = tb; newButtons[buttons.length] = tb;
tb.setTextOn(""); tb.setTextOn("");
tb.setTextOff(""); tb.setTextOff("");
int left = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, a.getResources().getDisplayMetrics()); int left = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2, a.getResources().getDisplayMetrics());
int metrics = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 64, a.getResources().getDisplayMetrics()); int metrics = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 64, a.getResources().getDisplayMetrics());
tb.setButtonDrawable(R.drawable.ic_other_modes); tb.setButtonDrawable(R.drawable.ic_other_modes);
LayoutParams lp = new LayoutParams(metrics, metrics); LayoutParams lp = new LayoutParams(metrics, metrics);
@ -238,7 +238,7 @@ public class AppModeDialog {
static private ToggleButton createToggle(Context ctx, LinearLayout layout, ApplicationMode mode, boolean drawer){ static private ToggleButton createToggle(Context ctx, LinearLayout layout, ApplicationMode mode, boolean drawer){
int margin = 0; int margin = 0;
if (drawer) { if (drawer) {
margin = 5; margin = 2;
} else { } else {
margin = 10; margin = 10;
} }