Why does TextView in single line elipsized with “end” show boxes?

前端 未结 6 1144
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 20:21

I\'m using a TextView in Android, what I want to show 1 line in TextView ending with \". \" but this give [] type box at the end. I don\'t know why? I just want to remvoe t

6条回答
  •  暖寄归人
    2020-12-04 20:50

    I have bumped into the same problem when was trying to use custom "MetaPro-Medium.otf" as font for TextView with a android:singleLine="true". The box at the end of the string was really annoying.

    I found no way how to solve this problem in Android, but at the same time found following work around.

    1. I have installed "FontLab Studio v5.04"
    2. Opened my font
    3. Selected one of symbols I was not going to use
    4. Menu->Glyph->Rename Glyph
    5. Changed the name and unicode index from it`s original value to "FEFF" (Thank CommonsWare)
    6. Double click on selected symbol and then remove all lines this symbol was created from.
    7. Menu->File->Generate Font->save as type otf

    As a result I got updated font and problem gone away.

提交回复
热议问题