Below i have added EditText
style in theme. I have added width and height also. So i removed android:layout_width
and android:layout_height
from my edittext
view. But it is saying error. If i add width and height it is working fine. What is the difference. Is theme is not applying to my edittext view?
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="android:editTextStyle">@style/custom_EditTextStyle</item>
</style>
<style name="custom_EditTextStyle" parent="@android:style/Widget.EditText">
<item name="android:background">@drawable/edittextbox</item>
<item name="android:singleLine">true</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">48dp</item>
</style>
My editText view
<EditText android:hint="Username" />