From 89764a9b773a26ea8411fb100bc51b68dfdfb1c9 Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 10 Nov 2014 09:55:17 +0200 Subject: [PATCH] Fixed app mode button not fit in drawer --- .../src/net/osmand/plus/activities/actions/AppModeDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java b/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java index c83aca5217..7dfd4ae0dd 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java @@ -102,7 +102,7 @@ public class AppModeDialog { newButtons[buttons.length] = tb; tb.setTextOn(""); 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()); tb.setButtonDrawable(R.drawable.ic_other_modes); 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){ int margin = 0; if (drawer) { - margin = 5; + margin = 2; } else { margin = 10; }