Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SeekBar Minimum Value

How to define a SeekBar's minimum value? Is this done in the XML layout or do I need to define it programatically?

Basically I need to change my minimum value from 0 to 0.2

like image 426
Sachin Avatar asked Jun 13 '10 17:06

Sachin


People also ask

How to set minimum value in SeekBar?

setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onStopTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub //int inVal = Integer. parseInt(String. valueOf(seekBar. getProgress())); //inVal =+ 70; //Toast.

How do I change my max and min on SeekBar?

Programmatically using Java code:seekBar = (SeekBar) findViewById(R. id. seekBar1); seekBar. setMax(225);

What is a SeekBar?

android.widget.SeekBar. A SeekBar is an extension of ProgressBar that adds a draggable thumb. The user can touch the thumb and drag left or right to set the current progress level or use the arrow keys. Placing focusable widgets to the left or right of a SeekBar is discouraged.

How can I make SeekBar thicker?

You can use the Slider provided by the Material Components Library. Use the app:trackHeight="xxdp" (the default value is 4dp ) to change the height of the track bar. It requires the version 1.2. 0 of the library.


1 Answers

How to define a SeekBar's minimum value?

You can't define the minimum value. It is 0.

Basically I need to change my minimum value from 0 to 0.2

When you get the value, add 0.2 to it.

like image 163
CommonsWare Avatar answered Oct 06 '22 00:10

CommonsWare