remove strings duplicates

remove ripple drawable creating part from getAlphaStateDrawable()
This commit is contained in:
Nazar 2019-09-10 11:59:08 +03:00
parent 3bed81f855
commit 287805d933
2 changed files with 0 additions and 21 deletions

View file

@ -38,9 +38,7 @@
<string name="list_of_installed_plugins">List of installed plugins</string>
<string name="configure_navigation">Configure navigation</string>
<string name="general_settings_profile_descr">App theme, units, region</string>
<string name="configure_profile">Configure profile</string>
<string name="screen_alerts_descr">Alerts will be shown on left bottom corner of the screen during the navigation.</string>
<string name="switch_profile">Switch profile</string>
<string name="language_and_output">Language and output</string>
<string name="reset_to_default">Reset to default</string>
<string name="manage_profiles_descr">Create, import, edit profiles</string>

View file

@ -173,25 +173,6 @@ public class UiUtilities {
}
private static Drawable getAlphaStateDrawableImpl(@ColorInt int colorMode1, @ColorInt int colorMode2, boolean highlightOnNormal, boolean highlightOnPressed) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ColorStateList csl = new ColorStateList(
new int[][]
{
new int[]{android.R.attr.state_pressed},
new int[]{android.R.attr.state_focused},
new int[]{android.R.attr.state_activated},
new int[]{}
},
new int[]
{
colorMode2,
colorMode1,
colorMode1,
colorMode1
}
);
return new RippleDrawable(csl, null, null);
}
StateListDrawable sld = new StateListDrawable();
if (highlightOnNormal && highlightOnPressed) {
sld.addState(new int[]{android.R.attr.state_pressed}, new ColorDrawable(colorMode2));