Có thể dán nhãn nổi (Email/Mật khẩu) vào trong hộp hay không. Về cơ bản giảm không gian ở giữa gợi ý và đầu vào thực tế.Android - giảm bớt nhãn/lề lề nhãn EditText?
Tôi đã thử đệm trên/dưới. Lề trên/dưới cho editText. Nhưng không ai trong số họ đưa ra kết quả tôi đang tìm kiếm.
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/emailWrapper"
app:hintTextAppearance="@style/floatingLabel">
<EditText
android:layout_width="match_parent"
android:layout_height="54dp"
android:paddingLeft="17dp"
android:paddingRight="17dp"
android:id="@+id/txtEmail"
android:singleLine="true"
android:inputType="textEmailAddress"
android:hint="@string/emailPlaceholder"
android:background="@drawable/btn_empty_stroke" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintTextAppearance="@style/floatingLabel"
android:id="@+id/passwordWrapper"
android:layout_below="@+id/emailWrapper">
<EditText
android:layout_width="match_parent"
android:layout_height="54dp"
android:paddingLeft="17dp"
android:paddingRight="17dp"
android:singleLine="true"
android:inputType="textPassword"
android:id="@+id/txtPassword"
android:paddingTop="0dp"
android:text="HELLO"
android:hint="@string/passwordPlaceholder"
android:background="@drawable/btn_empty_stroke" />
</android.support.design.widget.TextInputLayout>
Điều gì xảy ra nếu bạn cũng giảm chiều cao? –