android: limit of 10 characters per line TextView

前端 未结 3 769
情深已故
情深已故 2021-01-19 18:31

I read value from EditText and write it to TextView

editTitle1.addTextChangedListener(new TextWatcher() {
              public void afterTextChanged(Editable         


        
3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-19 19:11

    Add the following 2 attributes to the TextView definition:

    android:singleLine="false"  
    android:maxems="10"
    

提交回复
热议问题