0
我試圖更改浮動標籤「電子郵件」的顏色,如屏幕截圖中所示。如何更改TextInputLayout中的浮動標籤顏色
這裏是佈局XML的內容:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.premedios.streetler.LoginActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:orientation="vertical"
android:layout_marginTop="10dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="150dp"
android:src="@drawable/logo"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/TextLabel">
<EditText
android:id="@+id/email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/email_hint"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/TextLabel">
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password_hint"/>
</android.support.design.widget.TextInputLayout>
<Button
android:id="@+id/login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@color/colorText"
android:text="@string/LoginButtonText"
android:textColor="@color/colorPrimaryDark"
android:textSize="20sp"/>
<com.facebook.login.widget.LoginButton
android:id="@+id/facebook_login_button"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:height="44dp"
android:visibility="gone"/>
<TextView
android:id="@+id/signup"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="@string/register_link_text"
android:textSize="18sp"/>
</LinearLayout>
我想改變這種浮動標籤顏色一樣的提示顏色。任何幫助讚賞。
我推薦給你,使一看http://www.hermosaprogramacion.com/ 2016/03/edittext-android /,希望它有幫助;) –