下面我已添加主题中的EditText样式。我增加了宽度和高度。所以我从edittext视图中删除了android:layout_width和android:layout_height。但它是在说错误。如果我添加宽度和高度,它工作正常。有什么不同。主题不适用于我的edittext视图吗?layout_width和layout_height不适用于从主题编辑文本
<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>
我EDITTEXT视图
<EditText android:hint="Username" />
你的风格属性在哪里? –
Blackbelt
它是一个皮棉还是编译错误? –