fixed typos

This commit is contained in:
madwasp79 2019-06-19 16:15:05 +03:00
parent 55d2b0d412
commit 21fe632078
2 changed files with 4 additions and 6 deletions

View file

@ -553,7 +553,7 @@ public class ApplicationMode {
mode.locationIconDayLost = R.drawable.map_bicycle_location_lost; mode.locationIconDayLost = R.drawable.map_bicycle_location_lost;
mode.locationIconNightLost = R.drawable.map_bicycle_location_lost_night; mode.locationIconNightLost = R.drawable.map_bicycle_location_lost_night;
break; break;
case NAUTICAL: case DEFAULT:
mode.bearingIconDay = R.drawable.map_pedestrian_bearing; mode.bearingIconDay = R.drawable.map_pedestrian_bearing;
mode.bearingIconNight = R.drawable.map_pedestrian_bearing_night; mode.bearingIconNight = R.drawable.map_pedestrian_bearing_night;
mode.headingIconDay = R.drawable.map_default_location_view_angle; mode.headingIconDay = R.drawable.map_default_location_view_angle;
@ -563,7 +563,7 @@ public class ApplicationMode {
mode.locationIconDayLost = R.drawable.map_pedestrian_location_lost; mode.locationIconDayLost = R.drawable.map_pedestrian_location_lost;
mode.locationIconNightLost = R.drawable.map_pedestrian_location_lost_night; mode.locationIconNightLost = R.drawable.map_pedestrian_location_lost_night;
break; break;
case DEFAULT: case NAUTICAL:
mode.bearingIconDay = R.drawable.map_nautical_bearing; mode.bearingIconDay = R.drawable.map_nautical_bearing;
mode.bearingIconNight = R.drawable.map_nautical_bearing_night; mode.bearingIconNight = R.drawable.map_nautical_bearing_night;
mode.headingIconDay = R.drawable.map_nautical_location_view_angle; mode.headingIconDay = R.drawable.map_nautical_location_view_angle;

View file

@ -136,9 +136,8 @@ public class AppModeDialog {
final boolean checked = selected.contains(mode); final boolean checked = selected.contains(mode);
ImageView iv = (ImageView) tb.findViewById(R.id.app_mode_icon); ImageView iv = (ImageView) tb.findViewById(R.id.app_mode_icon);
View selection = tb.findViewById(R.id.selection); View selection = tb.findViewById(R.id.selection);
Drawable drawable = ctx.getUIUtilities().getIcon(mode.getIconRes(ctx), mode.getIconColorInfo().getColor(nightMode));
if (checked) { if (checked) {
Drawable drawable = ctx.getUIUtilities().getIcon(mode.getIconRes(ctx), mode.getIconColorInfo().getColor(nightMode));
iv.setImageDrawable(drawable); iv.setImageDrawable(drawable);
iv.setContentDescription(String.format("%s %s", mode.toHumanString(ctx), ctx.getString(R.string.item_checked))); iv.setContentDescription(String.format("%s %s", mode.toHumanString(ctx), ctx.getString(R.string.item_checked)));
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
@ -149,7 +148,6 @@ public class AppModeDialog {
} }
} else { } else {
if (useMapTheme) { if (useMapTheme) {
Drawable drawable = ctx.getUIUtilities().getIcon(mode.getIconRes(ctx), nightMode ? R.color.route_info_control_icon_color_dark : R.color.route_info_control_icon_color_light);
if (Build.VERSION.SDK_INT >= 21) { if (Build.VERSION.SDK_INT >= 21) {
Drawable active = ctx.getUIUtilities().getIcon(mode.getIconRes(ctx), mode.getIconColorInfo().getColor(nightMode)); Drawable active = ctx.getUIUtilities().getIcon(mode.getIconRes(ctx), mode.getIconColorInfo().getColor(nightMode));
drawable = AndroidUtils.createPressedStateListDrawable(drawable, active); drawable = AndroidUtils.createPressedStateListDrawable(drawable, active);
@ -162,7 +160,7 @@ public class AppModeDialog {
AndroidUtils.setBackground(ctx, selection, nightMode, R.drawable.btn_border_pressed_trans_light, R.drawable.btn_border_pressed_trans_dark); AndroidUtils.setBackground(ctx, selection, nightMode, R.drawable.btn_border_pressed_trans_light, R.drawable.btn_border_pressed_trans_dark);
} }
} else { } else {
iv.setImageDrawable(ctx.getUIUtilities().getThemedIcon(mode.getIconRes(ctx))); iv.setImageDrawable(ctx.getUIUtilities().getIcon(mode.getIconRes(ctx), mode.getIconColorInfo().getColor(nightMode)));
} }
iv.setContentDescription(String.format("%s %s", mode.toHumanString(ctx), ctx.getString(R.string.item_unchecked))); iv.setContentDescription(String.format("%s %s", mode.toHumanString(ctx), ctx.getString(R.string.item_unchecked)));
} }