Dies ist meine styles.xml DateiWie eine Farbe aus Layout verweisen
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#6d3655</item>
<item name="colorPrimaryDark">#442142</item>
<item name="colorAccent">#de8573</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
Und ich will colorPrimary von meinem Layout zuzugreifen. Zum Beispiel versuche ich die Farbe auf ein TextField anzuwenden. Ich setze die "textColor" -Eigenschaft auf "@ style/AppTheme.colorPrimary", aber es funktioniert nicht. Warum?