Fixed app mode button not fit in drawer

This commit is contained in:
Denis 2014-11-10 09:55:17 +02:00
parent 6a7fb4670b
commit 89764a9b77

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;
} }