这是我的xml
<android.support.design.widget.TextInputLayout
style="@style/main_input_text"
android:layout_marginTop="@dimen/activity_medium_margin"
app:hintTextAppearance="@style/TextAppearence.App.TextInputLayout">
<android.support.v7.widget.AppCompatEditText
style="@style/main_edit_text"
android:inputType="text" />
</android.support.design.widget.TextInputLayout>
这就是风格
<style name="main_input_text">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/activity_edittext_height</item>
<item name="android:background">@drawable/mc_shape_border_button_transparent</item>
<item name="android:gravity">center_vertical</item>
<item name="android:paddingTop">@dimen/activity_extra_small_margin</item>
<item name="android:paddingBottom">@dimen/activity_extra_small_margin</item>
<item name="android:keyTextSize">8sp</item>
<item name="android:textSize">8sp</item>
</style>
我没有发现像hintSize、textSize 和 keyTextSize 这样的东西没有帮助