试图在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>
使用:
<com.google.android.material.textfield.TextInputLayout
...
android:hint="@string/mark_and_model">
<com.google.android.material.textfield.TextInputEditText
..../>
</com.google.android.material.textfield.TextInputLayout>