android - Writing text vertically -
this question has answer here:
i have graph , want show name of axis vertically. how write vertically along y-axis ? tried using textview.setrotation(270)
had problems width width not getting decreased when in vertical.
one thing subclass textview
, override ondraw
method
@override protected void ondraw(canvas canvas) { canvas.save(); canvas.translate(0, getheight()); canvas.rotate(-90); layout layout = getlayout(); if (layout != null) layout.draw(canvas); canvas.restore(); }
Comments
Post a Comment