0

Let's say I had a Seekbar object called sb1 and had to set the max of its range. setMax takes in an int value. Is there a way to set the max and min of the range of the Seekbar using a DP value instead of an int? How can I do that?

 sb1.setMax(100);
  • 2
    Does this answer your question? [Android set seekbar with decimal](https://stackoverflow.com/questions/45875075/android-set-seekbar-with-decimal) – Tim Apr 19 '21 at 03:18
  • Your question doesn't make sense. The minimum and maximum values of a seekbar aren't lengths. They're just values- they control what value you get when you query where the thumb is. As such they have no type. You seem to want to do something about sizing the seekbar with this, which wouldn't be done via setMax. – Gabe Sechan Apr 19 '21 at 03:56
  • I never said I want to manipulate the length. I said I want to manipulate the maximum and minimum values shown on the seekbar as the range of what values the seekbar can slide to. setMin and setMax are used for that. I want to instead of pass in int values find a way to directly manipulate it with DP. – tovibashir Apr 19 '21 at 04:26

0 Answers0