KinGPinG
KinGPinG

Reputation: 171

Android Textview with MaxLenght and maxLines with the same maxLenght

I'm trying to configure a TextView which has maxLines=3 and EACH LINE of it has maxLenght=30.

Thanks for any help.

Upvotes: 1

Views: 55

Answers (1)

Arda Ç.
Arda Ç.

Reputation: 534

  1. You can use maxWidth function for actual 30 chars (avg. 1 char width x 30). So each line length will be max 30 chars.

  2. You can use 3 textView instead of 1 textView. And you can control from code after entering every char. textView.getText().length() <= 30

Upvotes: 1

Related Questions