mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
R.drawable.vector_label_background for API 21
This commit is contained in:
parent
20336af84e
commit
0ad059359f
10 changed files with 15 additions and 43 deletions
|
@ -22,7 +22,6 @@ import androidx.constraintlayout.motion.widget.MotionLayout
|
|||
import androidx.core.view.isVisible
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
import im.vector.app.R
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
import kotlinx.android.synthetic.main.motion_fab_menu_merge.view.*
|
||||
|
||||
class FabMenuView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null,
|
||||
|
@ -37,12 +36,6 @@ class FabMenuView @JvmOverloads constructor(context: Context, attrs: AttributeSe
|
|||
override fun onFinishInflate() {
|
||||
super.onFinishInflate()
|
||||
|
||||
// Tint label background
|
||||
listOf(createRoomItemChatLabel, createRoomItemGroupLabel)
|
||||
.forEach {
|
||||
it.setBackgroundResource(ThemeUtils.getResourceId(context, R.drawable.vector_label_background_light))
|
||||
}
|
||||
|
||||
listOf(createRoomItemChat, createRoomItemChatLabel)
|
||||
.forEach {
|
||||
it.setOnClickListener {
|
||||
|
|
|
@ -180,7 +180,6 @@ object ThemeUtils {
|
|||
THEME_DARK_VALUE -> {
|
||||
return when (resourceId) {
|
||||
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_dark
|
||||
R.drawable.vector_label_background_light -> R.drawable.vector_label_background_dark
|
||||
else -> {
|
||||
Timber.w("Warning, missing case for wanted drawable in dark theme")
|
||||
resourceId
|
||||
|
@ -190,7 +189,6 @@ object ThemeUtils {
|
|||
THEME_BLACK_VALUE -> {
|
||||
return when (resourceId) {
|
||||
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_black
|
||||
R.drawable.vector_label_background_light -> R.drawable.vector_label_background_black
|
||||
else -> {
|
||||
Timber.w("Warning, missing case for wanted drawable in black theme")
|
||||
resourceId
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
<corners android:radius="3dp" />
|
||||
|
||||
<solid android:color="@color/riotx_fab_label_bg_dark" />
|
||||
<solid android:color="?riotx_fab_label_bg" />
|
||||
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
android:color="@color/black" />
|
||||
android:color="?riotx_fab_label_stroke" />
|
||||
|
||||
</shape>
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="3dp" />
|
||||
|
||||
<solid android:color="@color/riotx_fab_label_bg_black" />
|
||||
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
android:color="@color/black" />
|
||||
|
||||
</shape>
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="3dp" />
|
||||
|
||||
<solid android:color="@color/riotx_fab_label_bg_light" />
|
||||
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
android:color="#1EFFFFFF" />
|
||||
|
||||
</shape>
|
|
@ -163,6 +163,11 @@
|
|||
<color name="riotx_fab_label_bg_dark">#FF181B21</color>
|
||||
<color name="riotx_fab_label_bg_black">#FF181B21</color>
|
||||
|
||||
<attr name="riotx_fab_label_stroke" format="color" />
|
||||
<color name="riotx_fab_label_stroke_light">#1EFFFFFF</color>
|
||||
<color name="riotx_fab_label_stroke_dark">@color/black</color>
|
||||
<color name="riotx_fab_label_stroke_black">@color/black</color>
|
||||
|
||||
<attr name="riotx_fab_label_color" format="color" />
|
||||
<color name="riotx_fab_label_color_light">#FF2E2F32</color>
|
||||
<color name="riotx_fab_label_color_dark">#FFA1B2D1</color>
|
||||
|
|
|
@ -330,8 +330,7 @@
|
|||
<item name="android:paddingBottom">4dp</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textColor">?riotx_fab_label_color</item>
|
||||
<!-- Note bg will be updated in the code -->
|
||||
<item name="android:background">@drawable/vector_label_background_light</item>
|
||||
<item name="android:background">@drawable/vector_label_background</item>
|
||||
</style>
|
||||
|
||||
<style name="BottomSheetItemTextMain">
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<item name="riotx_fab_secondary_bg">@color/riotx_fab_secondary_bg_black</item>
|
||||
<item name="riotx_fab_secondary_color">@color/riotx_fab_secondary_color_black</item>
|
||||
<item name="riotx_fab_label_bg">@color/riotx_fab_label_bg_black</item>
|
||||
<item name="riotx_fab_label_stroke">@color/riotx_fab_label_stroke_black</item>
|
||||
<item name="riotx_fab_label_color">@color/riotx_fab_label_color_black</item>
|
||||
<item name="riotx_touch_guard_bg">@color/riotx_touch_guard_bg_black</item>
|
||||
<item name="riotx_attachment_selector_background">@color/riotx_attachment_selector_background_black</item>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<item name="riotx_fab_secondary_bg">@color/riotx_fab_secondary_bg_dark</item>
|
||||
<item name="riotx_fab_secondary_color">@color/riotx_fab_secondary_color_dark</item>
|
||||
<item name="riotx_fab_label_bg">@color/riotx_fab_label_bg_dark</item>
|
||||
<item name="riotx_fab_label_stroke">@color/riotx_fab_label_stroke_dark</item>
|
||||
<item name="riotx_fab_label_color">@color/riotx_fab_label_color_dark</item>
|
||||
<item name="riotx_touch_guard_bg">@color/riotx_touch_guard_bg_dark</item>
|
||||
<item name="riotx_attachment_selector_background">@color/riotx_attachment_selector_background_dark</item>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<item name="riotx_fab_secondary_bg">@color/riotx_fab_secondary_bg_light</item>
|
||||
<item name="riotx_fab_secondary_color">@color/riotx_fab_secondary_color_light</item>
|
||||
<item name="riotx_fab_label_bg">@color/riotx_fab_label_bg_light</item>
|
||||
<item name="riotx_fab_label_stroke">@color/riotx_fab_label_stroke_light</item>
|
||||
<item name="riotx_fab_label_color">@color/riotx_fab_label_color_light</item>
|
||||
<item name="riotx_touch_guard_bg">@color/riotx_touch_guard_bg_light</item>
|
||||
<item name="riotx_keys_backup_banner_accent_color">@color/riotx_keys_backup_banner_accent_color_light</item>
|
||||
|
|
Loading…
Reference in a new issue