Wie man ein EditText
wie unten Bild style.
Ich habe verschiedene Optionen ausprobiert, aber kann das nicht erreichen.Stil ein EditText android
-1
A
Antwort
0
<LinearLayout
android:layout_width="match_parent"
android:layout_margin="10dp"
android:layout_height="wrap_content">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/round_corner"
android:padding="10dp"
android:hint="First Name *"
android:textColorHint="#a9a9b3"
android:textSize="18dp"
/>
</LinearLayout>
dann eine ziehbar-Datei für die runde Ecke Hintergrund erstellen
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF"/>
<stroke android:width="2dip" android:color="#b0b6bc" />
<corners android:radius="3dip"/>
<padding android:left="0dip" android:top="0dip" android:right="0dip"
android:bottom="0dip" />
</shape>
1
<EditText
android:layout_width="300dp"
android:layout_height="40dp"
android:hint=" Name*"
android:background="@drawable/border"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"/>
erstellen xml in drawble Ordner fügen Sie diese in das
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffff" />
<stroke android:width="1dip" android:color="#363534" />
<corners android:radius="5dp" />
</shape>