5

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

enter image description here

Gopal Gopi
  • 11,101
  • 1
  • 30
  • 43
Aman
  • 220
  • 3
  • 9

3 Answers3

22

Use a bullet character, \u00b7

Dave Morrissey
  • 4,371
  • 1
  • 23
  • 31
3

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.)
Community
  • 1
  • 1
anishsane
  • 20,270
  • 5
  • 40
  • 73
1

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

Sunit Kumar Gupta
  • 1,203
  • 1
  • 11
  • 19