4
I have a Layout
simulating a PIN screen (type one lockscreen), where I have a EditText
. I’m using the AppCompat v21
to be able to use the Material style elements. However, I want to set the highlight color only on this PIN screen (Accent) to the EditText
, without altering the whole project.
Actually, this is my file styles.xml
:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/indigo</item>
<item name="colorPrimaryDark">@color/indigo_dark</item>
<item name="colorAccent">@android:color/white</item>
</style>
</resources>
I want only the Edittext of the PIN screen to use the white color in the highlight. The rest of the app I want to have another color, but I’m not able to do it. Is there a tag I need to use? Is there any way to do this via code?
Renan, from what I’ve seen, is predicted in the next versions of Appcompat the attribute
theme
for widgets (currently only theToolbar
has this feature). On Android Lollipop this is already supported. More details on: https://chris.banes.me/2014/11/12/theme-vs-style/– Wakim