I'm building an Android app on which I have to represent data in a Table-like format.
So I'm using TableLayout. The problem is that I have to draw a rotated string like in the following raw example:
How can I create my layout to be able to show the '2011' rotated?
Extend the TextView
class and override the onDraw
method.
@Override
protected void onDraw(Canvas canvas) {
canvas.save();
canvas.rotate(90, xPivot, yPivot);
super.onDraw(canvas);
canvas.restore();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With