Reputation: 25
My EditText isn't using the theme I've assigned to it.
Here is my activity's property in AndroidManifest.xml
:
<activity
android:name=".MainActivity"
android:label="Index"
android:screenOrientation="portrait"
android:theme="@style/IndexTheme"
android:windowSoftInputMode="stateVisible|adjustResize" >
</activity>
Here is my styles.xml
:
<style name="IndexTheme" parent="AppBaseTheme">
<item name="android:windowContentOverlay">@null</item>
<item name="android:editTextStyle">@style/IndexEditText</item>
<item name="android:textCursorDrawable">@drawable/cursor_dark</item>
<item name="colorControlNormal">@color/text_c</item>
<item name="colorControlActivated">@color/primary</item>
<item name="colorControlHighlight">@color/primary</item>
</style>
<style name="IndexEditText" parent="@android:style/Widget.EditText">
<item name="android:textSize">16sp</item>
<item name="android:textColor">@color/white</item>
<item name="android:textColorHint">@color/white</item>
<item name="android:paddingTop">16dp</item>
<item name="android:paddingBottom">16dp</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:paddingRight">16dp</item>
</style>
And here is my styles.xml
(v21):
<style name="IndexTheme" parent="AppBaseTheme">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:editTextStyle">@style/IndexEditText</item>
<item name="alertDialogTheme">@style/AlertDialogTheme</item>
</style>
Yesterday it was working fine. Today I updated my support libraries from v22 to v23.1.1 and it not longer works.
Why?
Upvotes: 0
Views: 371
Reputation: 21
use both these 2 lines instead
<item name="editTextStyle">@style/IndexEditText</item>
<item name="android:editTextStyle">@style/IndexEditText</item>
It's works for me.
Upvotes: 2