very short question: if I want to set some text (in a TextView) back to the default text color, how can I do this?
I'm not using any themes.
I used the solution from jellyfish's comment on the first answer. A lot of code for something so simple as removing color. To make it clear:
private TextView myTextView;
private int defaultTextColor;
public void onCreate(Bundle savedInstanceState) {
myTextView = (TextView) findViewById(R.id.myTextView);
defaultTextColor = myTextView.getTextColors().getDefaultColor();
}
public void changeColorBack() {
myTextView.setTextColor(defaultTextColor);
}
I used the following way: At the initialization I backuped the default color and when I had to reset I just used the stores value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With