code cleaninng
This commit is contained in:
parent
17abdd3379
commit
b9e0601a67
3 changed files with 5 additions and 3 deletions
|
@ -551,7 +551,6 @@ public class ApplicationMode {
|
||||||
try {
|
try {
|
||||||
return app.getResources().getIdentifier(variableName, "drawable", packageName);
|
return app.getResources().getIdentifier(variableName, "drawable", packageName);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,8 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
|
||||||
protected int themeRes;
|
protected int themeRes;
|
||||||
|
|
||||||
private LinearLayout itemsContainer;
|
private LinearLayout itemsContainer;
|
||||||
|
|
||||||
|
@StringRes
|
||||||
protected int dismissButtonStringRes = R.string.shared_string_cancel;
|
protected int dismissButtonStringRes = R.string.shared_string_cancel;
|
||||||
|
|
||||||
public void setUsedOnMap(boolean usedOnMap) {
|
public void setUsedOnMap(boolean usedOnMap) {
|
||||||
|
@ -249,7 +251,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
|
||||||
return dismissButtonStringRes;
|
return dismissButtonStringRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setDismissButtonTextId(int stringRes) {
|
protected void setDismissButtonTextId(@StringRes int stringRes) {
|
||||||
dismissButtonStringRes = stringRes;
|
dismissButtonStringRes = stringRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ import java.util.HashSet;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.ApplicationMode;
|
import net.osmand.plus.ApplicationMode;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
|
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
|
||||||
|
@ -118,7 +119,7 @@ public class AppModesBottomSheetDialogFragment extends MenuBottomSheetDialogFrag
|
||||||
R.layout.bottom_sheet_item_simple, null);
|
R.layout.bottom_sheet_item_simple, null);
|
||||||
TextView textView = (TextView) textButtonView.findViewById(R.id.title);
|
TextView textView = (TextView) textButtonView.findViewById(R.id.title);
|
||||||
|
|
||||||
int dpPadding = (int) (8 * getResources().getDisplayMetrics().density + 0.5f);
|
int dpPadding = AndroidUtils.dpToPx(getMyApplication(), 8);
|
||||||
textView.setPadding(dpPadding, 0, 0, 0);
|
textView.setPadding(dpPadding, 0, 0, 0);
|
||||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16.0f);
|
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16.0f);
|
||||||
textView.setTextColor(nightMode
|
textView.setTextColor(nightMode
|
||||||
|
|
Loading…
Reference in a new issue