Vertical (rotated) label in Android

后端 未结 10 1010
礼貌的吻别
礼貌的吻别 2020-11-22 08:04

I need 2 ways of showing vertical label in Android:

  1. Horizontal label turned 90 degrees counterclockwise (letters on the side)
  2. Horizontal label with l
10条回答
  •  死守一世寂寞
    2020-11-22 08:45

    One way to achieve these would be:

    1. Write your own custom view and override onDraw(Canvas). You can draw the text on the canvas and then rotate the canvas.
    2. Same as 1. except this time use a Path and draw text using drawTextOnPath(...)

提交回复
热议问题