Search code examples
androidandroiddesignsupportandroid-textinputlayout

TextInputLayout with new support for character counting


I read out new blog post of android-developers here.

TextInputLayout expands its existing functionality of floating hint text and error indicators with new support for character counting.

But I can't find any programmatically code support for character counting. I want some code to implementation of character counting using TextInputLayout


Solution

  • There is a new setCounterEnabled(boolean) method that you can use to enable the character counter.

    It simply displays the current character count inside the view.