Issue
I've created an ImageButton which when I perform a long click on it, its background becomes black. How can I change its style from to ?
And also, how can I add to the button while a long click is performed?
Solution
You can use:
<androidx.appcompat.widget.AppCompatImageButton
android:background="?attr/selectableItemBackgroundBorderless"
../>
and:
val imageButton : ImageButton = findViewById(R.id.imagebutton)
ViewCompat.setTooltipText(imageButton, "Tooltip")
Answered By - Gabriele Mariotti
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.