Stopping text from splitting to multiple lines on the periods in web addresses

前端 未结 4 501
既然无缘
既然无缘 2021-01-11 19:39

I have an Android TextView displaying some text, and it\'s multi-line. However, in the text, I sometimes have domain names; how can I stop the TextView from splitting the l

4条回答
  •  逝去的感伤
    2021-01-11 19:51

    for me didn't work solution of @ozbek respectively @Matt McMinn, I had to change line

    else if(Character.isWhitespace(curChar))
    

    for

    } else if (curChar == '\u00A0') {
    

    but otherwise great solution, thanks

提交回复
热议问题