What is default color for text in textview? What is default color for text in textview? android android

What is default color for text in textview?


Actually the color TextView is:

android:textColor="@android:color/tab_indicator_text"

or

#808080


You can save old color and then use it to restore the original value. Here is an example:

ColorStateList oldColors =  textView.getTextColors(); //save original colorstextView.setTextColor(Color.RED);....textView.setTextColor(oldColors);//restore original colors

But in general default TextView text color is determined from current Theme applied to your Activity.


There are some default colors defined in android.R.color

int c = getResources().getColor(android.R.color.primary_text_dark);