How to fix the this issue in Text Input Layout?

37 Views Asked by At

Im having trouble putting the eye toggle on top of the edit text in text input layout.

Can you help me fix this? I want to finish my project. Thank you!

Here is the XML file:

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

            android:id="@+id/PasswordEye"
            style="@style/NoBottomLine"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="@string/enter_password"
            app:boxBackgroundColor="@color/textbox_background"
            android:textColorHint="@color/textbox"
            app:boxCornerRadiusBottomEnd="@dimen/_5sdp"
            app:boxCornerRadiusBottomStart="@dimen/_5sdp"
            app:boxCornerRadiusTopEnd="@dimen/_5sdp"
            app:boxCornerRadiusTopStart="@dimen/_5sdp"
            android:layout_marginStart="20dp"
            android:layout_marginEnd="20dp"
            android:layout_marginTop="@dimen/_20sdp"
            app:boxStrokeWidth="0dp"
            app:boxStrokeWidthFocused="0dp"
            app:passwordToggleEnabled="true"
            app:passwordToggleTint="@color/primary">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/inputPassword"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="textPassword"
                android:textColor="@color/primary_text"
                android:imeOptions="actionDone"
                android:textSize="@dimen/_13ssp"
                android:ems="15"/>

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

here is the output:

enter image description here

0

There are 0 best solutions below