如何更改textinputlayout的提示文本颜色

and*_*irl 6 android colors android-textinputlayout

嗨,我在我的应用程序中使用TextInputLayout.我想将提示文本颜色和浮动标签颜色(聚焦和未聚焦)设置为白色.我试过下面的代码.

  <android.support.design.widget.TextInputLayout
 android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:theme="@style/TextLabel">

<android.support.v7.widget.AppCompatEditText
 android:layout_width="fill_parent"
 android:layout_height="wrap_content"
 android:hint="Hiiiii"
android:id="@+id/edit_id">
 </android.support.v7.widget.AppCompatEditText>
</android.support.design.widget.TextInputLayout>

<style name="TextLabel" parent="TextAppearance.AppCompat">
//hint color And Label Color in False State
<item name="android:textColorHint">@color/Color Name</item> 
<item name="android:textSize">20sp</item>
//Label color in True State And Bar Color False And True State
<item name="colorAccent">@color/Color Name</item>
<item name="colorControlNormal">@color/Color Name</item>
<item name="colorControlActivated">@color/Color Name</item>
</style>
Run Code Online (Sandbox Code Playgroud)

它适用于棒棒糖,但不适用于较低版本.如何在较低版本中实现相同的效果?

and*_*irl 0

我得到了答案。在低于棒棒糖的操作系统版本中,我们必须在应用程序主题中将文本颜色设置为白色(在我的例子中)。然后它就会起作用。