0

I am a beginner in android and has created an app which has a button,I am using a png background in that android button as the button's background and wants to add a shadow to it using.Should I go with elevation technique or using the corner coloring technique. Please guide me how to do it? Thanks

  • Possible duplicate of [How to provide shadow to Button](https://stackoverflow.com/questions/15333529/how-to-provide-shadow-to-button) – dustinos3 Nov 20 '18 at 18:50
  • [How to provide shadow to Button](https://stackoverflow.com/questions/15333529/how-to-provide-shadow-to-button) – Nero Nov 20 '18 at 18:50

1 Answers1

0

For getting shadow effect on your button or views add the line android:elevation="8dp" on your button(view) at layout file. Since you are new on android don't forget to search before posting a question. Yours sincerely

Edited: for enabling the elevation parameter of the button you should also disable stateListAnimator property of the button by adding android:stateListAnimator="@null" to your button.

Seymur Mammadli
  • 1,724
  • 15
  • 13