ฉันกำลังใช้สิ่งใหม่ TextInputLayoutจากไลบรารีการออกแบบ ฉันสามารถทำให้มันแสดงและเปลี่ยนสีของฉลากลอยได้ น่าเสียดายที่EditTextคำใบ้จริงตอนนี้เป็นสีขาวเสมอ
ฉันได้ลองเปลี่ยน hintColor ใน XML สไตล์และการเขียนโปรแกรมแล้วและลองใช้android.support.v7.widget.AppCompatEditText
แต่EditTextคำใบ้แสดงสีขาวอยู่เสมอ
นี่คือ XML ของฉันสำหรับฉันTextInputLayoutและEditText
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android.support.design:hintTextAppearance="@style/GreenTextInputLayout">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/city"
android:textColorHint="@color/black"
android:hint="@string/city" />
</android.support.design.widget.TextInputLayout>
และนี่คือสไตล์ที่ฉันใช้สำหรับTextInputLayout(ฉันพยายามทำให้hintTextColorคุณสมบัติเป็นสีดำ แต่ไม่ได้ทำอะไรให้ฉัน):
<style name="GreenTextInputLayout" parent="@style/TextAppearance.AppCompat">
<item name="android:textColor">@color/homestory_green</item>
</style>

