如何将全局自定义样式应用于android.support.design.widget.TextInputEditText?

我有我的AppTheme定义在style.xml ,我所有的应用程序的TextViewEditTextButton等全局应用自定义样式

现在我想为android.support.design.widget.TextInputEditText做同样的事情,但是如何?

它不扩展EditText以便忽略样式。

这是我得到的:

  <?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary</item> <item name="colorAccent">@color/accent</item> <!-- Globally override default widget styles with custom --> <item name="android:textViewStyle">@style/App.TextView</item> <item name="android:editTextStyle">@style/App.EditText</item> <item name="android:buttonStyle">@style/App.Button.Primary</item> </style> <style name="App.TextView" parent="@android:style/Widget.TextView"> <item name="android:textColor">@color/text</item> <item name="android:fontFamily">sans-serif-light</item> <item name="android:textSize">@dimen/textsize_normal</item> </style> <style name="App.EditText" parent="@android:style/Widget.EditText"> <item name="android:textColor">#f00</item> <item name="android:fontFamily">sans-serif-light</item> <item name="android:textSize">@dimen/textsize_xxxlarge</item> <item name="android:textStyle">bold</item> <item name="android:textColorHint">@color/text_hint</item> </style> <style name="App.Button" parent="@android:style/Widget.Button"> <item name="android:textSize">@dimen/button_text_size</item> <item name="android:fontFamily">sans-serif-medium</item> <item name="android:textAllCaps">false</item> </style> <style name="App.Button.Primary"> <item name="android:background">@drawable/button_primary_background</item> <item name="android:height">@dimen/button_primary_height</item> <item name="android:width">@dimen/button_primary_width</item> <item name="android:paddingLeft">@dimen/padding_normal</item> <item name="android:paddingRight">@dimen/padding_normal</item> <item name="android:textColor">@color/button_primary_text</item> </style> ... 

Solutions Collecting From Web of "如何将全局自定义样式应用于android.support.design.widget.TextInputEditText?"