mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 12:00:03 +03:00
Improve unread badge visibility
This commit is contained in:
parent
b43a2e7ac0
commit
79a2848ad2
5 changed files with 36 additions and 13 deletions
|
@ -279,6 +279,18 @@ object ThemeUtils {
|
|||
|
||||
return when (theme) {
|
||||
THEME_LIGHT_VALUE -> resourceId
|
||||
THEME_SC_LIGHT_VALUE -> {
|
||||
return when (resourceId) {
|
||||
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_light
|
||||
R.drawable.bg_unread_notification_light -> R.drawable.bg_unread_notification_sc_light
|
||||
R.drawable.vector_label_background_light -> R.drawable.vector_label_background_light
|
||||
R.drawable.divider_horizontal_light -> R.drawable.divider_horizontal_light
|
||||
else -> {
|
||||
Timber.w("Warning, missing case for wanted drawable in sc_light theme")
|
||||
resourceId
|
||||
}
|
||||
}
|
||||
}
|
||||
THEME_DARK_VALUE -> {
|
||||
return when (resourceId) {
|
||||
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_dark
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
|
||||
<corners android:radius="40dp" />
|
||||
|
||||
<solid android:color="@color/background_floating_sc" />
|
||||
<solid android:color="@color/accent_sc" />
|
||||
</shape>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="40dp" />
|
||||
|
||||
<solid android:color="@color/accent_sc" />
|
||||
</shape>
|
|
@ -98,7 +98,7 @@
|
|||
android:src="@drawable/ic_edit"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/roomNameView"
|
||||
app:layout_constraintEnd_toStartOf="@+id/roomUnreadCounterBadgeView"
|
||||
app:layout_constraintEnd_toStartOf="@+id/roomLastEventTimeView"
|
||||
app:layout_constraintStart_toEndOf="@+id/roomNameView"
|
||||
app:layout_constraintTop_toTopOf="@+id/roomNameView"
|
||||
tools:visibility="visible" />
|
||||
|
@ -107,20 +107,21 @@
|
|||
android:id="@+id/roomUnreadCounterBadgeView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:minWidth="16dp"
|
||||
android:minHeight="16dp"
|
||||
android:minWidth="24dp"
|
||||
android:minHeight="24dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="10sp"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/roomNameView"
|
||||
app:layout_constraintEnd_toStartOf="@+id/roomLastEventTimeView"
|
||||
app:layout_constraintStart_toEndOf="@+id/roomDraftBadge"
|
||||
app:layout_constraintTop_toTopOf="@+id/roomNameView"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/roomLastEventView"
|
||||
app:layout_constraintEnd_toEndOf="@+id/roomLastEventTimeView"
|
||||
app:layout_constraintStart_toEndOf="@+id/roomLastEventView"
|
||||
app:layout_constraintTop_toTopOf="@+id/roomLastEventView"
|
||||
tools:background="@drawable/bg_unread_highlight"
|
||||
tools:text="4"
|
||||
tools:visibility="visible" />
|
||||
|
@ -149,7 +150,7 @@
|
|||
android:maxLines="2"
|
||||
android:textColor="?riotx_text_secondary"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/roomUnreadCounterBadgeView"
|
||||
app:layout_constraintStart_toStartOf="@+id/roomNameView"
|
||||
app:layout_constraintTop_toBottomOf="@+id/roomNameView"
|
||||
tools:text="@sample/matrix.json/data/message" />
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
<color name="accent_sc">#8BC34A</color>
|
||||
<color name="accent_sc_alpha25">#3F8BC34A</color>
|
||||
<color name="accent_sc_alpha12">#1E8BC34A</color>
|
||||
<color name="direct_chat_ring_color_sc">#689F38</color>
|
||||
<color name="accent_sc_dark">#689F38</color>
|
||||
<color name="direct_chat_ring_color_sc">@color/accent_sc_dark</color>
|
||||
|
||||
<color name="avatar_fill_sc_1">@color/accent_sc</color>
|
||||
<color name="username_sc_1">@color/accent_sc</color>
|
||||
|
|
Loading…
Add table
Reference in a new issue