[TextInputLayout] Counter is hidden by keyboard
See original GitHub issueDescription: If app:counterEnabled=“true” is set in a TextInputLayout, whenever a user opens a keyboard to type in something, the counter is hidden by the keyboard thus defeating its purpose of letting the user know how much he/she has typed and how much character(s) are left.
Expected behavior: The expected behavior, IMHO, would be to make the modify the component in such a way that the keyboard no longer hides the counter and allows the user to know how much character(s) he/she is left to type.
Source code:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputDescriptionLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/TextInputLayoutAppearance"
app:counterEnabled="true"
app:counterMaxLength="35">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tvDescription"
style="@style/Text12RegularBlack"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="@string/account_holder_name_input_keys"
android:hint="@string/description"
android:imeOptions="actionDone"
android:inputType="textFilter"
android:maxLength="35"
android:paddingBottom="@dimen/padding_16dp"
android:textSize="@dimen/text_size_16sp" />
</com.google.android.material.textfield.TextInputLayout>
Android API version: 29
Material Library version: 1.1.0-alpha08
Device: Pixel 2
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
android - TextInputLayout counter hides when keyboard appear
TextInputLayout counter hides when keyboard appear [duplicate] ; Add screen shot, which can make better explanation. – Pankaj Kumar. May 23, 2016 ...
Read more >Error/counter text in TextInputLayout is covered by keyboard ...
The TextInputLayout contains an EditText which in turn receives the input from the user. With TextInputLayout introduced with the Android Design Support ...
Read more >TextInputLayout | Android Developers
The TextInputLayout will show a clear text button while there is input in the EditText. Clicking it will clear out the text and...
Read more >Android TextInputLayout Example | DigitalOcean
Android TextInputLayout is a design component that comes with the Material ... Styling the counter is similar to styling the hint text.
Read more >Working with the EditText Android 23.06.2017
getText().toString(); Toast.makeText(activity, text, Toast.LENGTH_SHORT).show(); // hide keyboard //InputMethodManager inputManager = ( ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We set it to true on the TextInputEditText’s default style here! https://github.com/material-components/material-components-android/blob/master/lib/java/com/google/android/material/textfield/res/values/styles.xml#L178 so the
R.styleable.TextInputEditText_textInputLayoutFocusedRectEnabled
will be true by defaultLooks like we can close the issue. : )