0

The outline for an OutlinedBox TextInputLayout doesnt leave a space for the hint/label:

enter image description here

<com.google.android.material.textfield.TextInputLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/edit_title_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Playlist Name" android:theme="@style/CustomTextInputLayout"> <com.google.android.material.textfield.TextInputEditText android:id="@+id/edit_title_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLength="60" android:imeOptions="actionDone" android:inputType="text" /> </com.google.android.material.textfield.TextInputLayout> <style name="CustomTextInputLayout" parent="@style/Widget.Material3.TextInputLayout.OutlinedBox"> <item name="colorPrimary">@color/dialog_text_color</item> <item name="colorOnSurface">@color/dialog_text_color</item> <item name="android:padding">15dp</item> </style> 

The documentation says to set the android:hint.

1 Answer 1

0

The problem could stem from the padding added to TextInputLayout (15dp), which would interfere with the hint/label.

You could also add padding to the first TextInputLayout in your code using android::paddingTop="15dp" (and/or paddingStart/paddingEnd) to make space for the label.

Sign up to request clarification or add additional context in comments.

1 Comment

Yeah, that was it. I'll need to add the padding to a layout around the TextInputLayout. Thanks

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.