1

enter image description here

I want to create sliding buttons in Android,

When we slide up the light indicator will glow, as we need change image while sliding it.

I have tried with toggle button and switch but its not having sliding effect?

Any suggestion on this.

Mac
  • 1,153
  • 2
  • 20
  • 34
  • You can follow this http://stackoverflow.com/questions/5151591/android-left-to-right-slide-animation – Pranav P Jul 01 '15 at 07:49
  • Actually I am looking for sliding not for animation. – Mac Jul 01 '15 at 08:31
  • Create two versions of this button,one in on state and other in off.Create a toggle button and set the backgrounds through program accordingly. – kgandroid Jul 01 '15 at 08:47
  • Thanks, I have tried this, but toggle button does not have sliding effect. – Mac Jul 01 '15 at 09:02

1 Answers1

0

Try to use thus library. When you will download it try to set your custom theme and get the solution. https://github.com/pellucide/Android-Switch-Demo-pre-4.0/tree/master/

GIGAMOLE
  • 1,274
  • 1
  • 11
  • 17
  • I have tried this library, in this its changing text after sliding toggle button, actually I am looking for only toggle button sliding, toggle button it self will change its color on different state. – Mac Jul 01 '15 at 08:34