diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt index 5351eb733..1002790ad 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -1760,6 +1760,8 @@ class ChatController(args: Bundle) : cancelReply() } + viewThemeUtils.themeImageButton(binding.messageInputView.findViewById(R.id.cancelReplyButton)) + cancelNotificationsForCurrentConversation() Log.d(TAG, "onAttach inConversation: " + inConversation.toString()) diff --git a/app/src/main/java/com/nextcloud/talk/ui/theme/ViewThemeUtils.kt b/app/src/main/java/com/nextcloud/talk/ui/theme/ViewThemeUtils.kt index 432cc4f4c..eec2bfea1 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/theme/ViewThemeUtils.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/theme/ViewThemeUtils.kt @@ -31,6 +31,7 @@ import android.view.View import android.view.ViewGroup import android.widget.CheckBox import android.widget.EditText +import android.widget.ImageButton import android.widget.ImageView import android.widget.LinearLayout import android.widget.ProgressBar @@ -211,6 +212,25 @@ class ViewThemeUtils @Inject constructor(private val theme: ServerTheme, private } } + fun themeImageButton(imageButton: ImageButton) { + withScheme(imageButton) { scheme -> + imageButton.imageTintList = ColorStateList( + arrayOf( + intArrayOf(android.R.attr.state_selected), + intArrayOf(-android.R.attr.state_selected), + intArrayOf(android.R.attr.state_enabled), + intArrayOf(-android.R.attr.state_enabled) + ), + intArrayOf( + scheme.primary, + scheme.onSurfaceVariant, + scheme.onSurfaceVariant, + calculateDisabledColor(scheme.onSurface, ON_SURFACE_OPACITY_BUTTON_DISABLED) + ) + ) + } + } + /** * Tints the image with element color */ diff --git a/app/src/main/res/layout/item_message_quote.xml b/app/src/main/res/layout/item_message_quote.xml index 8e28e1cd3..dc9e15c1f 100644 --- a/app/src/main/res/layout/item_message_quote.xml +++ b/app/src/main/res/layout/item_message_quote.xml @@ -104,9 +104,9 @@ android:layout_centerVertical="true" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" - android:background="@drawable/ic_cancel_black_24dp" - android:backgroundTint="@color/grey_600" + android:background="@color/transparent" android:contentDescription="@string/nc_message_quote_cancel_reply" + android:src="@drawable/ic_cancel_black_24dp" android:visibility="gone" tools:visibility="visible" />