edw*_*ard 3 android textview android-layout android-edittext android-styles
我目前正在使用这个自定义样式布局来EditTexts定义“styles.xml”:
<style name="Form_EditView">
    <item name="android:textColor">@color/white</item>
    <item name="android:textSize">@dimen/large_text_size</item>
    <item name="colorControlNormal">@color/white</item>
    <item name="colorControlActivated">@color/pink</item>
    <item name="colorControlHighlight">@color/pink</item>
</style>
然而现在我陷入了困境,因为我TextView希望将样式设置为默认的 Android EditText,但随后也应用上面的自定义样式。默认的 Android 样式如下所示:
style="@android:style/Widget.EditText"
我知道布局样式文件中可以继承,但如何在自定义样式中继承 Android 默认样式,以实现与此类似的效果:
<style name="Widget.EditText.Form_EditView">
继承其他样式的最简单方法是使用parent属性:
<style name="Form_EditView" parent="@android:style/Widget.EditText">
正如 @Bobby StJacques 指出的,如果你想继承你定义的样式(不是内置的 Android 样式),你可以使用以下形式:
<style name="Form_EditView.SomeCustomizedEditView">
    ....
</style>
在这种情况下,您继承了已经定义的Form_EditView