I have a Listview in my application. Listview rows are clickable. I have introduced a seek bar in each row of a Listview. Despite settings android:clickable="false" for Seekbar in layout xml, I am still able to click on it and move seek bar as desired. I don't want Seekbar to be clickbale but I do want Listview row to clickable.
Any pointers will be appreciated.
Here's my layout file
android:progressDrawable="@drawable/slider_range"
android:thumb="@drawable/slider_thumb"
android:layout_width="80dip"
android:layout_height="12dip"
android:focusable="false"
android:clickable="false"
android:longClickable="false"
seekBarObj.setOnSeekBarChangeListener( new OnSeekBarChangeListener() {
int originalProgress;
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
//Nothing here..
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
originalProgress = seekBar.getProgress();
}
@Override
public void onProgressChanged(SeekBar seekBar, int arg1, boolean fromUser) {
if( fromUser == true){
seekBar.setProgress( originalProgress);
}
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With