Andriod drag button widget

  • Thread starter Thread starter Android Central Question
  • Start date Start date
A

Android Central Question

I'm making a calculator where the answer can be changed with a drag button (like the volume buttom) and when the user drags the button the answer increases or decreases in 5% increments until they reach either end of the bar. Does andriod studio have an option like this?
 
I'm making a calculator where the answer can be changed with a drag button (like the volume buttom) and when the user drags the button the answer increases or decreases in 5% increments until they reach either end of the bar. Does andriod studio have an option like this?
Hi, if you can register a account here , me or other members be happy to assist you.
 
No idea. But you can use a plain slider and not change the value until it's changed by 5%, then show the change. You'll just have to maintain another variable as the slider is being moved - oldValue. And when you change to the new value, update oldValue to the current value. (I'd also keep valueAbove and valueBelow at that point for the 5% up and 5% down values.)
 
I'm not a programmer by any means, but you have me curious on why you want this function on a calculator. Would you be willing to explain its use?
 
I moved this to the Software Development forum for more specific traffic.
 

Trending Posts

Forum statistics

Threads
956,291
Messages
6,967,457
Members
3,163,505
Latest member
NirvaanGuilloux