0

Why is this SEEKBAR up to 100? We did not determine <ANDROID>

package com.mycompany.myapp; import android.app.*; import android.os.*; import android.widget.*; public class MainActivity extends Activity { SeekBar seekbarDemo1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); seekbarDemo1=(SeekBar)findViewById(R.id.seekbarDemo); seekbarDemo1.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { int seekbarProgreesValue = 0; public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { seekbarProgreesValue = progress;} public void onStartTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } public void onStopTrackingTouch(SeekBar seekBar) { Toast.makeText(MainActivity.this, "Seekbar progress :" + seekbarProgreesValue, Toast.LENGTH_SHORT).show(); } }); } }

17th Dec 2020, 8:38 AM
‏‪Amir Mardani‬‏
‏‪Amir Mardani‬‏ - avatar
1 Respuesta
0
By default it is 0 as minimum and 100 as maximum. You can change it by using setMin and setMax method.
20th Oct 2021, 2:23 PM
Rahul Kumar
Rahul Kumar - avatar