Hi, first post!! I had wanted the button on my app to be green after touching the button from grey while playing mp3, and then change back when mp3 is finishing. The first part work if I press the button but after the mp3 stops, it stays green. Any help appreciated!
My code:
My code:
Code:
synthA.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
mpBntClick.start();
mpBntClick.setLooping(false);
myVib.vibrate(50);
if (mpBntClick.isPlaying() == true){
synthA.getBackground().setColorFilter(0xFF00FF00, PorterDuff.Mode.MULTIPLY);
}
else if (mpBntClick.isPlaying() == false){
synthA.getBackground().setColorFilter(0xFFFAFAFA, PorterDuff.Mode.MULTIPLY);
}
}
});