0

following link has some button at the top like :: "DISEASES" , "FOOD & NUTRITION" , "PHYSICAL ACTIVITY" http://www.bam.gov/sub_yourbody/yourbody_smilestyle.html

when you focus it it will grow and remove from it it will small so question is how can i do it?

Nikunj Patel
  • 21,853
  • 23
  • 89
  • 133

2 Answers2

1

You have to understand that there's a huge difference between a mouse as a pointing device and your finger. A mouse can easily hover across these buttons to give you the effect, but it doesn't work as well with a finger, as you'd need to slide your finger across the buttons to get the effect - and who slides their finger across buttons instead of just pressing them?

Anyway, I suppose you could create an OnTouchListener for your Buttons, and perhaps throw in some animations to get the effects.

But - like I said - I don't see a reason to do this. It seems utterly unnecessary.

Michell Bak
  • 13,182
  • 11
  • 64
  • 121
1

What you have to do is set selector for your button as shown in my previous answer.

And depending on your requirement set drawable larger than the normal ones for that particular state , that will create the same effect

Community
  • 1
  • 1
ingsaurabh
  • 15,249
  • 7
  • 52
  • 81