I have a setting activity with a TextView and a set off buttons. I Want each button to changes the background of textviews in other activities.
I need example codes on how to do this.
Thank you all in advance.
Code:
btn.setOnClickListener( new
View .OnClickListener () {
public boolean stateChanged;
public void onClick(View view) {
if (stateChanged) {
// reset background to default;
tv.setBackgroundResource
(R.drawable.favon);
} else {
tv.setBackgroundResource
(R.drawable.favoff);
}
stateChanged = !stateChanged;