当前位置: 动力学知识库 > 问答 > 编程问答 >

set fullstop (.) center_vertical with textview android

问题描述:

How to set dot in vertically center of textview example (. Set .) , I want both dots in vertically center of set text. i have been tried with gravity center but didnt get any success, You can refer attached image where dot show after just now with very light color, i want same , so please suggest how to achieve this

网友答案:

Use a bullet character, \u00b7

网友答案:

There is no way you can do this in the way you are trying to do it.

Remember, fullstop may look as just a dot, but in reality, there is empty space above the dot. From bitmap perspective, it is as tall as any other character.

You may, however, try below 2 approaches:

  1. Use different character instead of fullstop. e.g. "\u00B7". It looks like ·set·
  2. Change the font size of just . (not possible in simple textview, AFAIK. Possible in rich text edit boxes.)
网友答案:

Set margin from top in negative(like -10dp).

分享给朋友:
您可能感兴趣的文章:
随机阅读: