We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description: prefixText position is wrong when endIconMode is set
Expected behavior: Prefix text should be properly aligned.
Source code:
<com.google.android.material.textfield.TextInputLayout android:id="@+id/contact_container" style="@style/Widget.Design.TextInputLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="8dp" app:endIconDrawable="@drawable/ic_call" app:endIconMode="custom" app:prefixText="+65" app:prefixTextAppearance="@style/TextAppearance.AppCompat.Medium"> <com.google.android.material.textfield.TextInputEditText android:id="@+id/contact" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Contact" tools:text="61234561" android:inputType="phone" /> </com.google.android.material.textfield.TextInputLayout>
Android API version: any
Material Library version: 1.3.0
Device: any + Android Studio layout editor
The text was updated successfully, but these errors were encountered:
Hello, I have the same issue, I'm curious about this because I'm not using endIconMode
endIconMode
First field was input manually.
Second field was filled using setText
setText
Sorry, something went wrong.
hello @sdex this could be related wit the issue #773
This fix worked for me:
inputLayout.prefixTextView.updateLayoutParams { height = ViewGroup.LayoutParams.MATCH_PARENT } inputLayout.prefixTextView.gravity = Gravity.CENTER
@felipeska thanks for sharing this. I used the dirty workaround, wrapped it with FrameLayout, and put ImageButton at the end.
Looks like a duplicate of #1773
drchen
No branches or pull requests
Description: prefixText position is wrong when endIconMode is set
Expected behavior: Prefix text should be properly aligned.
Source code:
Android API version: any
Material Library version: 1.3.0
Device: any + Android Studio layout editor
The text was updated successfully, but these errors were encountered: