mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 17:08:34 +03:00
theme quote deletion image button
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
d27f0e2222
commit
f6e215ad63
3 changed files with 24 additions and 2 deletions
|
@ -1760,6 +1760,8 @@ class ChatController(args: Bundle) :
|
|||
cancelReply()
|
||||
}
|
||||
|
||||
viewThemeUtils.themeImageButton(binding.messageInputView.findViewById<ImageButton>(R.id.cancelReplyButton))
|
||||
|
||||
cancelNotificationsForCurrentConversation()
|
||||
|
||||
Log.d(TAG, "onAttach inConversation: " + inConversation.toString())
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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" />
|
||||
|
||||
|
|
Loading…
Reference in a new issue