How to get theme text color in layout xml? android:textColor="?attr/editTextColor"
works for EditText color but I cannot find value for default text (TextView) color. I want to get text color to use in other elements.
Asked
Active
Viewed 171 times
0

Mateusz Kaflowski
- 2,221
- 1
- 29
- 35
-
default textview text color is set by your activity theme – Maksym V. Feb 15 '18 at 17:37
-
default colors are set by primaryColor in the styles for the application theme – Remario Feb 15 '18 at 17:37
-
you can extend it and add your own or modify it there – Remario Feb 15 '18 at 17:37
-
https://stackoverflow.com/questions/42139798/how-to-set-textview-text-color-to-specific-theme-color may help! – Palak Jain Feb 15 '18 at 17:49
-
You can use style i.e style="?my_text_view_style"... – Nik Feb 15 '18 at 18:35
1 Answers
0
If You Are Using Android Studio, Then Press Ctrl+B or Command+B (For Mac) On The Resource Name You Want to go to. As You are finding colour for textView. Then press ctrl + B, it will redirect you to the default style xml of android. You Can Find Shades There. I find out default shades from the same source of course as Google has not given is every value of shades for every View. Reply me back if it really helps you. Happy Coding.

Anuj Kumar
- 1,092
- 1
- 12
- 26