Home > Software engineering >  Custom button android studio
Custom button android studio

Time:05-10

I want to create a custom button similar to the this

and when I hold press on the button it should animate like this this

CodePudding user response:

The logic is to:

  1. Create a button and a view behind it, this can be done using RelativeLayout
  2. List to onLongPress of the button and hide the behind background
  3. Reset the visitbility to View.Visisble once the button long press is released
  • Related