forked from GitHub-Mirror/riotX-android
Theme FAB menu
This commit is contained in:
@ -29,6 +29,7 @@ import im.vector.riotredesign.R
|
||||
import im.vector.riotredesign.core.animations.ANIMATION_DURATION_SHORT
|
||||
import im.vector.riotredesign.core.animations.SimpleTransitionListener
|
||||
import im.vector.riotredesign.core.animations.VectorFullTransitionSet
|
||||
import im.vector.riotredesign.features.themes.ThemeUtils
|
||||
import kotlinx.android.synthetic.main.merge_fab_menu_view.view.*
|
||||
|
||||
class FabMenuView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null,
|
||||
@ -57,6 +58,11 @@ class FabMenuView @JvmOverloads constructor(context: Context, attrs: AttributeSe
|
||||
createRoomItemGroupLabel.isVisible = false
|
||||
// Collapse end
|
||||
|
||||
// Tint label background
|
||||
listOf(createRoomItemChatLabel, createRoomItemGroupLabel)
|
||||
.forEach {
|
||||
it.setBackgroundResource(ThemeUtils.getResourceId(context, R.drawable.vector_label_background_light))
|
||||
}
|
||||
|
||||
createRoomButton.setOnClickListener {
|
||||
toggleFabMenu()
|
||||
|
@ -184,9 +184,10 @@ object ThemeUtils {
|
||||
THEME_LIGHT_VALUE -> resourceId
|
||||
THEME_DARK_VALUE -> {
|
||||
return when (resourceId) {
|
||||
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_dark
|
||||
R.drawable.bg_unread_notification_light -> R.drawable.bg_unread_notification_dark
|
||||
else -> {
|
||||
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_dark
|
||||
R.drawable.bg_unread_notification_light -> R.drawable.bg_unread_notification_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
|
||||
}
|
||||
@ -194,9 +195,10 @@ object ThemeUtils {
|
||||
}
|
||||
THEME_BLACK_VALUE -> {
|
||||
return when (resourceId) {
|
||||
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_black
|
||||
R.drawable.bg_unread_notification_light -> R.drawable.bg_unread_notification_black
|
||||
else -> {
|
||||
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_black
|
||||
R.drawable.bg_unread_notification_light -> R.drawable.bg_unread_notification_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
|
||||
}
|
||||
|
Reference in New Issue
Block a user