The TextInputLayout introduces a nice counter function in the support-library version 23.1.0 - unfortunately with the floating-hint this gets very high in layout_height. Is there a way to bring the counter to the top ( on the same height as the floating-label? )
Set TextInputLayout android:clickable="true" . Set TextInputEditText android:clickable="true" and android:focusable="false" .
↳ com.google.android.material.textfield.TextInputEditText. A special sub-class of EditText designed for use as a child of TextInputLayout . Using this class allows us to display a hint in the IME when in 'extract' mode and provides accessibility support for TextInputLayout .
Android TexInputLayout extends LinearLayout. The primary use of a TextInputLayout is to act as a wrapper for EditText(or its descendant) and enable floating hint animations. Rule of Thumb : TextInputLayout should wrap TextInputEditText instead of the normal EditText.
Currently you can't do it.
The TextInputLayout
follows the material guide line and the counter is on the bottom.
Checking the code you can only customize these specs:
enable counter also available with xml attribute android.support.design:counterEnabled
The counter max lenght also available with xml attribute app:counterMaxLength
. (this attr is not currently in the official doc. You can check this post)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With