Arsmn1996 Arsmn1996 - 2 months ago 11
Android Question

How to create an image button with raise effect?

I have some Button with background that support press state and normal state but raise effect remove when i set background for it.
How to enable raise effect with background?

Answer

The thing you are calling raised is actually known as elevation in android devlpment enviroment terms. You can set the elevation for the view in the XML like below

android:elevation="4dp"

NOTE : This was introduced from API 21 lollipop.