I want to create a custom search panel whose progress bar color changes between red and blue as the user changes the course of the panel.
I tried, but only changed the background color, not the color of the progress bar.
seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
public void onStopTrackingTouch(SeekBar seekBar) {
}
public void onStartTrackingTouch(SeekBar seekBar) {
}
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
seekBar.setBackgroundColor(Color.RED + progress);
}
});
source
share