is it possible to have an EditText with multiple Lines which automatically makes a Line break after every 20th Character the user is typing in?
In your XML file create the edittext like this,
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textMultiLine" >
<requestFocus />
</EditText>
You can implement TextWatcher interface and implement method afterTextChanged. The method will be invoked after text changed, so you can add the line breaks in it by yourself.
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