TextInputLayout скрывает текст - PullRequest
1 голос
/ 04 мая 2020

Попытка установить текст в com.google. android .material.textfield.TextInputLayout. Но подсказка всегда в верхней позиции и скрывает текст, что я могу сделать, чтобы исправить это

    <com.google.android.material.textfield.TextInputLayout
        android:layout_marginTop="@dimen/basic_padding_margin"
        android:theme="@style/TextInputLayoutAppearance"
        android:id="@+id/model_input_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <EditText
            android:id="@+id/model"
            android:focusableInTouchMode="false"
            android:layout_width="match_parent"
            android:layout_height="55dp"
            android:inputType="text"
            android:autofillHints="@string/mark_and_model"
            android:hint="@string/mark_and_model"
            />
    </com.google.android.material.textfield.TextInputLayout>

1 Ответ

0 голосов
/ 04 мая 2020

Использование:

<com.google.android.material.textfield.TextInputLayout
    ...
    android:hint="@string/mark_and_model">

    <com.google.android.material.textfield.TextInputEditText 
     ..../>

</com.google.android.material.textfield.TextInputLayout>
...