1
天兒真好傢伙, 最有可能是簡單的修復,但是我是新來的這一切......如何強調電子郵件和密碼edittext字段?
我正在做一個基本的登錄頁面,對於一個應用程序,但是,電子郵件地址和密碼「的EditText」字段不顯示下劃線來定義字段...任何方式來打開它們?
圖片僅供參考:https://i.gyazo.com/e5747592689b1e8ddc15e0667caa5dae.png
代碼:
<?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:id="@+id/activity_login"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/colorPrimary"
tools:context="com.example.living_instinkt.maintlog.LoginActivity">
<TextView
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:textAlignment="center"
android:text="@string/app_name"
android:textSize="30sp"
android:padding="20dp"
android:textColor="@color/white"
android:id="@+id/textView" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:maxLines="1"
android:id="@+id/etEmail"
android:hint="Email"
android:textColorHint="@color/white"
android:layout_marginTop="30dp"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:id="@+id/etPass"
android:hint="Password"
android:textColorHint="@color/white"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"/>
乾杯!
Thanks mate!我覺得應該有一個更簡單的方法....或者,也許只是下劃線爲默認,但得到它排序,謝謝! :P –
@LivingInstinkt你是welocme。我不認爲有另一種方式來做到這一點。這不是* HTML * with * CSS *,Android UI基於* XML *。在任何情況下你都不能使用下劃線字符。如果您發現我的答案有用,請將其標記爲已接受的答案。要了解如何接受答案,請在此閱讀http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work –