Change colors according to the new color palette.

This commit is contained in:
Onuray Sahin 2020-07-03 13:36:30 +03:00
parent 332041e13b
commit a7480c1860
7 changed files with 53 additions and 31 deletions

View File

@ -67,17 +67,22 @@ abstract class ProfileActionItem : VectorEpoxyModel<ProfileActionItem.Holder>()
holder.view.isClickable = false
}
holder.title.text = title
val tintColor = if (destructive) {
val titleTintColor = if (destructive) {
ContextCompat.getColor(holder.view.context, R.color.riotx_notice)
} else {
ThemeUtils.getColor(holder.view.context, R.attr.riotx_text_primary)
}
holder.title.setTextColor(tintColor)
val iconTintColor = if (destructive) {
ContextCompat.getColor(holder.view.context, R.color.riotx_notice)
} else {
ThemeUtils.getColor(holder.view.context, R.attr.riotx_text_secondary)
}
holder.title.setTextColor(titleTintColor)
holder.subtitle.setTextOrHide(subtitle)
if (iconRes != 0) {
holder.icon.setImageResource(iconRes)
if (tintIcon) {
ImageViewCompat.setImageTintList(holder.icon, ColorStateList.valueOf(tintColor))
ImageViewCompat.setImageTintList(holder.icon, ColorStateList.valueOf(iconTintColor))
} else {
ImageViewCompat.setImageTintList(holder.icon, null)
}
@ -95,7 +100,7 @@ abstract class ProfileActionItem : VectorEpoxyModel<ProfileActionItem.Holder>()
if (editableRes != 0 && editable) {
val tintColorSecondary = if (destructive) {
tintColor
titleTintColor
} else {
ThemeUtils.getColor(holder.view.context, R.attr.riotx_text_secondary)
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/riotx_accent" android:state_checked="true" />
<item android:color="?riotx_bottom_nav_icon_color" />
</selector>

View File

@ -106,6 +106,7 @@
android:layout_height="48dp"
android:background="?riotx_background"
app:itemIconSize="20dp"
app:itemIconTint="@color/bottom_navigation_icon_tint_selector"
app:labelVisibilityMode="unlabeled"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -4,8 +4,8 @@
<!-- Source: https://zpl.io/aBKw9Mk -->
<!-- Accents -->
<color name="riotx_accent">#FF03B381</color>
<color name="riotx_accent_alpha25">#3F03B381</color>
<color name="riotx_accent">#FF00BE8A</color>
<color name="riotx_accent_alpha25">#3F00BE8A</color>
<color name="riotx_destructive_accent">#FFFF4B55</color>
@ -13,9 +13,9 @@
<color name="riotx_button_primary_accent_alpha12">#14368BD6</color>
<color name="riotx_positive_accent">#03B381</color>
<color name="riotx_disabled_accent">#61708B</color>
<color name="riotx_positive_accent_alpha12">#1E03B381</color>
<color name="riotx_positive_accent">#00BE8A</color>
<color name="riotx_disabled_accent">#C4C4C4</color>
<color name="riotx_positive_accent_alpha12">#1E00BE8A</color>
<color name="riotx_button_disabled_alpha12">#1E61708B</color>
@ -23,13 +23,13 @@
<color name="riotx_notice_secondary">#FF61708B</color>
<color name="riotx_links">#FF368BD6</color>
<color name="riotx_avatar_fill_1">#FF03b381</color>
<color name="riotx_avatar_fill_1">#FF03B381</color>
<color name="riotx_avatar_fill_2">#FF368bd6</color>
<color name="riotx_avatar_fill_3">#FFac3ba8</color>
<color name="riotx_username_1">#368bd6</color>
<color name="riotx_username_2">#ac3ba8</color>
<color name="riotx_username_3">#03b381</color>
<color name="riotx_username_3">#03B381</color>
<color name="riotx_username_4">#e64f7a</color>
<color name="riotx_username_5">#ff812d</color>
<color name="riotx_username_6">#2dc2c5</color>
@ -46,13 +46,13 @@
<attr name="riotx_background" format="color" />
<color name="riotx_background_light">#FFFFFFFF</color>
<color name="riotx_background_dark">#FF181B21</color>
<color name="riotx_background_dark">#FF15191E</color>
<color name="riotx_background_black">#FF000000</color>
<attr name="riotx_base" format="color" />
<color name="riotx_base_light">#FF27303A</color>
<color name="riotx_base_dark">#FF15171B</color>
<color name="riotx_base_black">#FF060708</color>
<color name="riotx_base_light">#FFF5F7FA</color>
<color name="riotx_base_dark">#FF22282F</color>
<color name="riotx_base_black">#FF000000</color>
<attr name="riotx_base_text_icon_primary" format="color" />
<color name="riotx_base_text_icon_primary_light">#FFFFFFFF</color>
@ -80,14 +80,14 @@
<color name="riotx_header_panel_border_mobile_black">#FF0D0F12</color>
<attr name="riotx_header_panel_text_primary" format="color" />
<color name="riotx_header_panel_text_primary_light">#FF61708B</color>
<color name="riotx_header_panel_text_primary_dark">#FFA1B2D1</color>
<color name="riotx_header_panel_text_primary_black">#FFA1B2D1</color>
<color name="riotx_header_panel_text_primary_light">#FF171910</color>
<color name="riotx_header_panel_text_primary_dark">#FFFFFFFF</color>
<color name="riotx_header_panel_text_primary_black">#FFFFFFFF</color>
<attr name="riotx_header_panel_text_secondary" format="color" />
<color name="riotx_header_panel_text_secondary_light">#FFC8C8CD</color>
<color name="riotx_header_panel_text_secondary_dark">#FFC8C8CD</color>
<color name="riotx_header_panel_text_secondary_black">#FFC8C8CD</color>
<color name="riotx_header_panel_text_secondary_light">#8F97A3</color>
<color name="riotx_header_panel_text_secondary_dark">#FFA9B2BC</color>
<color name="riotx_header_panel_text_secondary_black">#FFA9B2BC</color>
<attr name="riotx_text_primary" format="color" />
<color name="riotx_text_primary_light">#FF2E2F32</color>
@ -110,14 +110,14 @@
<color name="riotx_android_secondary_black">#FF7E899C</color>
<attr name="riotx_search_placeholder" format="color" />
<color name="riotx_search_placeholder_light">#FF61708B</color>
<color name="riotx_search_placeholder_dark">#FF61708B</color>
<color name="riotx_search_placeholder_black">#FF61708B</color>
<color name="riotx_search_placeholder_light">#FF8F97A3</color>
<color name="riotx_search_placeholder_dark">#FFA9B2BC</color>
<color name="riotx_search_placeholder_black">#FFA9B2BC</color>
<attr name="riotx_room_highlight" format="color" />
<color name="riotx_room_highlight_light">#FFFFFFFF</color>
<color name="riotx_room_highlight_light">#FFF6F7F8</color>
<color name="riotx_room_highlight_dark">#FF343446</color>
<color name="riotx_room_highlight_black">#FF22262E</color>
<color name="riotx_room_highlight_black">#FF343446</color>
<attr name="riotx_unread_room_indent" format="color" />
<color name="riotx_unread_room_indent_light">#FF2E3648</color>
@ -127,12 +127,12 @@
<attr name="riotx_android_status_bar" format="color" />
<color name="riotx_android_status_bar_light">#FF2E3648</color>
<color name="riotx_android_status_bar_dark">#FF0D0E10</color>
<color name="riotx_android_status_bar_black">#FF000000</color>
<color name="riotx_android_status_bar_black">#FF0D0E10</color>
<attr name="riotx_line_break_mobile" format="color" />
<color name="riotx_line_break_mobile_light">#FFEEEFEF</color>
<color name="riotx_line_break_mobile_dark">#FF61708B</color>
<color name="riotx_line_break_mobile_black">#FF22262E</color>
<color name="riotx_line_break_mobile_black">#FF61708B</color>
<!-- Other colors, which are not in the pallette -->
<attr name="riotx_unread_room_badge" format="color" />
@ -186,16 +186,21 @@
<color name="riotx_room_active_widgets_banner_text_black">#E3E8F0</color>
<attr name="riotx_bottom_nav_background_color" format="color" />
<color name="riotx_bottom_nav_background_color_light">#FFF3F8FD</color>
<color name="riotx_bottom_nav_background_color_light">@color/riot_primary_background_color_light</color>
<color name="riotx_bottom_nav_background_color_dark">@color/primary_color_dark</color>
<color name="riotx_bottom_nav_background_color_black">@color/primary_color_black</color>
<color name="riotx_bottom_nav_background_color_status">@color/riot_primary_background_color_status</color>
<attr name="riotx_bottom_nav_background_border_color" format="color" />
<color name="riotx_bottom_nav_background_border_color_light">##AAAAAAAA</color>
<color name="riotx_bottom_nav_background_border_color_light">#E9EDF1</color>
<color name="riotx_bottom_nav_background_border_color_dark">#55555555</color>
<color name="riotx_bottom_nav_background_border_color_black">#FF15171b</color>
<color name="riotx_bottom_nav_background_border_color_status">FFE9EDF1</color>
<color name="riotx_bottom_nav_background_border_color_status">#FFE9EDF1</color>
<attr name="riotx_bottom_nav_icon_color" format="color" />
<color name="riotx_bottom_nav_icon_color_light">#C1C6CD</color>
<color name="riotx_bottom_nav_icon_color_dark">#8E99A4</color>
<color name="riotx_bottom_nav_icon_color_black">#8E99A4</color>
<attr name="riotx_waiting_background_color" format="color" />
<color name="riotx_waiting_background_color_light">#FFE9EDF1</color>

View File

@ -36,6 +36,8 @@
<item name="riotx_room_active_widgets_banner_bg">@color/riotx_room_active_widgets_banner_bg_black</item>
<item name="riotx_room_active_widgets_banner_text">@color/riotx_room_active_widgets_banner_text_black</item>
<item name="riotx_bottom_nav_icon_color">@color/riotx_bottom_nav_icon_color_black</item>
<!-- Drawables -->
<item name="riotx_highlighted_message_background">@drawable/highlighted_message_background_black</item>

View File

@ -34,6 +34,8 @@
<item name="riotx_room_active_widgets_banner_bg">@color/riotx_room_active_widgets_banner_bg_dark</item>
<item name="riotx_room_active_widgets_banner_text">@color/riotx_room_active_widgets_banner_text_dark</item>
<item name="riotx_bottom_nav_icon_color">@color/riotx_bottom_nav_icon_color_dark</item>
<item name="riotx_keys_backup_banner_accent_color">@color/riotx_keys_backup_banner_accent_color_dark</item>
<!-- Drawables -->

View File

@ -35,6 +35,8 @@
<item name="riotx_room_active_widgets_banner_bg">@color/riotx_room_active_widgets_banner_bg_light</item>
<item name="riotx_room_active_widgets_banner_text">@color/riotx_room_active_widgets_banner_text_light</item>
<item name="riotx_bottom_nav_icon_color">@color/riotx_bottom_nav_icon_color_light</item>
<!-- Drawables -->
<item name="riotx_highlighted_message_background">@drawable/highlighted_message_background_light</item>