The text in totalizador1TextView, do not change according with instruction, allways black. MIUI Global 14.0.13 Android 13TP1A
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="MeuTema" parent="Theme.MaterialComponents.DayNight"> <item name="colorPrimary">@color/amarelo_torrado</item> <item name="colorPrimaryDark">@color/encarnado</item> <item name="colorAccent">@color/verde</item> <item name="textAllCaps">false</item> <item name="android:textAllCaps">false</item> <item name="android:forceDarkAllowed">false</item> </style> </resources>
protected void onCreate(Bundle savedInstanceState) { AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
.....
.....
.....
totalizador1TextView.setTextColor(ContextCompat.getColor(this, R.color.amarelo));