I do not understand how to make such a trace at the button, which is filled when you click on it. Maybe someone knows how?
1 answer
New-> Android XML File (Drawable, selector) with a name like "icon_phone" that’s this:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/button_pressed" android:state_pressed="true" /> <item android:drawable="@drawable/button_normal" /> </selector> you create two files in drawable resources: drawable / button_normal - vessels image not pressed, drawable / button_pressed - vessels image pressed (with a trace)
in the properties of the button:
android:drawable="@drawable/icon_phone" - So it's not about changing the pictures of a button that is pressed and not pressed. Open VC and there it is implemented in the player. There, when pressed, it fills itself in the form of a circle. - Michael Shcherbakov
- it is necessary to formulate the question correctly, with reference to VK, for example. I do not use it, I'm sorry I did not recognize it by appearance. - avp
- Sorry, not used to asking trivial questions) - Michael Shcherbakov
|


android:background="?selectableItemBackgroundBorderless"- Yuriy SPb ♦?- this is an indication that it is necessary to take a value from the current topic, i.e. the value may be different for the light / dark theme and will be different in these cases. The picture should not be installed as a background. If you have anImageView, useandroid:srcfor the image. - Yuriy SPb ♦ImageViewwith background and image - it will definitely work and you can customize anything. FAB is not good here, it is for another. - Yuriy SPb ♦