[android] better colour for inactive lane icons

Signed-off-by: Harry Bond <me@hbond.xyz>
This commit is contained in:
Harry Bond 2024-07-31 19:59:37 +01:00 committed by Alexander Borsuk
parent ca3d273729
commit a90e62436e
6 changed files with 11 additions and 4 deletions

View file

@ -25,9 +25,9 @@ public class LanesDrawable extends Drawable
@ColorRes
private static final int ACTIVE_LANE_TINT_RES = R.color.white_primary;
@ColorRes
private static final int INACTIVE_LANE_TINT_RES = R.color.icon_tint_light;
private static final int INACTIVE_LANE_TINT_RES = R.color.white_38;
@ColorRes
private static final int INACTIVE_LANE_TINT_NIGHT_RES = R.color.icon_tint_light_night;
private static final int INACTIVE_LANE_TINT_NIGHT_RES = R.color.white_40;
@DimenRes
private static final int MARGIN_RES = R.dimen.margin_quarter;

View file

@ -68,7 +68,7 @@ public class LanesAdapter extends RecyclerView.Adapter<LanesAdapter.LanesViewHol
private void setIconTint(@NonNull SingleLaneInfo info)
{
int iconTint = info.mIsActive ? R.attr.iconTint : R.attr.iconTintLight;
int iconTint = info.mIsActive ? R.attr.iconTint : R.attr.navLaneArrowInactiveColor;
TypedValue color = new TypedValue();
mArrow.getContext().getTheme().resolveAttribute(iconTint, color, true);
mArrow.setImageTintList(ColorStateList.valueOf(color.data));

View file

@ -9,6 +9,6 @@
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:theme="?navigationTheme"
app:tint="?iconTint"
app:tint="?navLaneArrowInactiveColor"
app:srcCompat="@drawable/ic_then_right"
tools:showIn="@layout/layout_nav_top" />

View file

@ -122,6 +122,8 @@
<color name="routing_button_activated_tint">@color/bg_statusbar</color>
<color name="routing_button_activated_tint_night">@color/bg_statusbar_night</color>
<color name="routing_button_pressed_tint">#80FFFFFF</color>
<color name="nav_lanearrow_inactive_light">#FF007CCB</color>
<color name="nav_lanearrow_inactive_night">#FF2C88AD</color>
<!-- Editor -->
<color name="bg_editor_light">#FFF2F6F6</color>

View file

@ -20,6 +20,9 @@
<attr name="navNextTurnFrame" format="reference" />
<attr name="navNextNextTurnFrame" format="reference" />
<attr name="navLanesCardBackgroundColor" format="reference" />
<attr name="navLaneArrowInactiveColor" format="reference" />
<attr name="navLaneArrowInactiveLight" format="color" />
<attr name="navLaneArrowInactiveNight" format="color" />
<attr name="buttonBackground" format="reference" />
<attr name="buttonTextColor" format="color" />
<attr name="buttonTextColorDisabled" format="color" />

View file

@ -47,6 +47,7 @@
<item name="navNextTurnFrame">@drawable/bg_nav_next_turn</item>
<item name="navNextNextTurnFrame">@drawable/bg_nav_next_next_turn</item>
<item name="navLanesCardBackgroundColor">@color/base_accent</item>
<item name="navLaneArrowInactiveColor">@color/nav_lanearrow_inactive_light</item>
<item name="buttonBackground">@drawable/button</item>
<item name="buttonTextColor">@color/button_text</item>
@ -181,6 +182,7 @@
<item name="navNextTurnFrame">@drawable/bg_nav_next_turn_night</item>
<item name="navNextNextTurnFrame">@drawable/bg_nav_next_next_turn_night</item>
<item name="navLanesCardBackgroundColor">@color/base_accent_night</item>
<item name="navLaneArrowInactiveColor">@color/nav_lanearrow_inactive_night</item>
<item name="buttonBackground">@drawable/button_night</item>
<item name="buttonTextColor">@color/button_text_night</item>