I want to Change color of an image on SeekBar OnProgress change event? I am showing an image in imageview and below that there is an SeekBar to change the color of an image.
I am using following way to change color of Imageview using seekbar
private SeekBar.OnSeekBarChangeListener seekBarChangeListener = new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
updateOuterColor();
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
};
And updateOuterColor method will look something like this.
private void updateOuterColor() {
seekR = seekBar1.getProgress();
seekG = seekBar2.getProgress();
seekB = seekBar3.getProgress();
innerLips.setColorFilter(0xff000000 + seekR * 0x10000 + seekG * 0x100
+ seekB);
eyeInnerOne.setColorFilter(0xff000000 + seekR * 0x10000 + seekG * 0x100
+ seekB);
eyeInnerTwo.setColorFilter(0xff000000 + seekR * 0x10000 + seekG * 0x100
+ seekB);
}
Now the problem is when i am moving my seekbar this method overwrites my imageview. It means i am not able to see my imageview instead of that i can just see the different color over my image. I just want to apply that color on my image not over the image.
I have tried with some different code and android property but not able to figured it out.
If any one have idea then please help me...