I want to have a SeekBar
with a thumb that appears as the user interacts with it (by dragging it to the desired location) and disappears after the interaction.
Today my SeekBar
looks like this:
<SeekBar android:id="@+id/seekBar_volume"
android:layout_width="fill_parent"
android:progressDrawable="@drawable/custom_player_seekbar_background"
android:paddingTop="10px"
android:paddingBottom="10px"
android:thumb="@drawable/myThumb"
android:paddingLeft="30px"
android:paddingRight="30px"
android:minHeight="6dip"
android:maxHeight="6dip"
android:layout_height="wrap_content"
android:layout_centerVertical="true"/>
The thumb position only changes with user interaction (something like a "volume control").
seekBarVolume.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
public void onStopTrackingTouch(SeekBar arg0) {
}
public void onStartTrackingTouch(SeekBar arg0) {
}
public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, arg1, 0);
}
});
I tried to use the selector
's feature, setting the thumb's drawable with a customized xml to handle the different states I wanted, but it didn't work =/
Thanks in advance for any help