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) { val bottomBarColor = getBottomBarColor()
resources.getColor(R.color.you_bottom_bar_color)
} else {
getBottomNavigationBackgroundColor()
}
thread_send_message_holder.setBackgroundColor(bottomBarColor) thread_send_message_holder.setBackgroundColor(bottomBarColor)
reply_disabled_info_holder.setBackgroundColor(bottomBarColor) reply_disabled_info_holder.setBackgroundColor(bottomBarColor)
updateNavigationBarColor(bottomBarColor) updateNavigationBarColor(bottomBarColor)
@ -553,7 +548,6 @@ class ThreadActivity : SimpleActivity() {
private fun setupButtons() { private fun setupButtons() {
updateTextColors(thread_holder) updateTextColors(thread_holder)
val textColor = getProperTextColor() val textColor = getProperTextColor()
val backgroundColor = getProperBackgroundColor()
thread_send_message.apply { thread_send_message.apply {
setTextColor(textColor) setTextColor(textColor)
compoundDrawables.forEach { compoundDrawables.forEach {
@ -660,8 +654,8 @@ class ThreadActivity : SimpleActivity() {
scroll_to_bottom_fab.setOnClickListener { scroll_to_bottom_fab.setOnClickListener {
scrollToBottom() scrollToBottom()
} }
scroll_to_bottom_fab.hide() val fabColor = getBottomBarColor()
scroll_to_bottom_fab.setColors(textColor, backgroundColor, backgroundColor) scroll_to_bottom_fab.setColors(textColor, fabColor, fabColor)
setupScheduleSendUi() setupScheduleSendUi()
} }
@ -1690,4 +1684,10 @@ class ThreadActivity : SimpleActivity() {
showAttachmentPicker() 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_height="wrap_content"
android:layout_margin="@dimen/activity_margin" android:layout_margin="@dimen/activity_margin"
android:src="@drawable/ic_arrow_down_vector" android:src="@drawable/ic_arrow_down_vector"
android:visibility="invisible"
app:fabSize="mini" app:fabSize="mini"
app:layout_constraintBottom_toBottomOf="@id/thread_messages_fastscroller" app:layout_constraintBottom_toBottomOf="@id/thread_messages_fastscroller"
app:layout_constraintEnd_toEndOf="@id/thread_messages_fastscroller" app:layout_constraintEnd_toEndOf="@id/thread_messages_fastscroller"