Change fab bg color

This commit is contained in:
Naveen 2023-01-15 09:12:30 +05:30
parent 2d3650deb4
commit bdafa4b847
2 changed files with 10 additions and 9 deletions

View File

@ -178,12 +178,7 @@ class ThreadActivity : SimpleActivity() {
}
}
val bottomBarColor = if (baseConfig.isUsingSystemTheme) {
resources.getColor(R.color.you_bottom_bar_color)
} else {
getBottomNavigationBackgroundColor()
}
val bottomBarColor = getBottomBarColor()
thread_send_message_holder.setBackgroundColor(bottomBarColor)
reply_disabled_info_holder.setBackgroundColor(bottomBarColor)
updateNavigationBarColor(bottomBarColor)
@ -553,7 +548,6 @@ class ThreadActivity : SimpleActivity() {
private fun setupButtons() {
updateTextColors(thread_holder)
val textColor = getProperTextColor()
val backgroundColor = getProperBackgroundColor()
thread_send_message.apply {
setTextColor(textColor)
compoundDrawables.forEach {
@ -660,8 +654,8 @@ class ThreadActivity : SimpleActivity() {
scroll_to_bottom_fab.setOnClickListener {
scrollToBottom()
}
scroll_to_bottom_fab.hide()
scroll_to_bottom_fab.setColors(textColor, backgroundColor, backgroundColor)
val fabColor = getBottomBarColor()
scroll_to_bottom_fab.setColors(textColor, fabColor, fabColor)
setupScheduleSendUi()
}
@ -1690,4 +1684,10 @@ class ThreadActivity : SimpleActivity() {
showAttachmentPicker()
}
}
private fun getBottomBarColor() = if (baseConfig.isUsingSystemTheme) {
resources.getColor(R.color.you_bottom_bar_color)
} else {
getBottomNavigationBackgroundColor()
}
}

View File

@ -127,6 +127,7 @@
android:layout_height="wrap_content"
android:layout_margin="@dimen/activity_margin"
android:src="@drawable/ic_arrow_down_vector"
android:visibility="invisible"
app:fabSize="mini"
app:layout_constraintBottom_toBottomOf="@id/thread_messages_fastscroller"
app:layout_constraintEnd_toEndOf="@id/thread_messages_fastscroller"