我試圖像下面安卓:在EditText上的右側這是在TextInputLayout
的圖片在上面的圖片密碼字段是TextInputLayout,它也創造了一個佈局顯示的TextView在右側有一個TextView,它指向忘記密碼活動。
我achive的EditText用的TextView沒有TextInpt佈局像下面使用相對佈局
碼 - xml文件
<EditText
android:id="@+id/email_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_email"
android:drawableStart="@drawable/ic_email"
android:drawablePadding="10dp"
android:hint="@string/email_address"
android:textSize="14sp"
android:maxLines="1"
android:inputType="textEmailAddress" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:id="@+id/etxt_password_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_password"
android:drawableStart="@drawable/ic_password"
android:drawablePadding="10dp"
android:textSize="14sp"
android:hint="Password"
android:layout_alignParentLeft="true"
android:inputType="textPassword"
android:maxLines="1"/>
<TextView
android:id="@+id/txt_forget_password"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="forget ?"
android:textSize="12sp"
android:layout_marginRight="10dp"
android:textColor="#808080"
/>
</RelativeLayout>
,但如果我在的EditText我添加TextInputLayout無法實現它..嘗試和搜索了很多。
?我們如何reslove上述問題
謝謝。
嗨@Adarsh阿肖克,做你解決了這個問題。我現在面臨同樣的問題。你能幫我 –