Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Upside Down text

 
Tyrel Richey
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does any one know how to make text upside down in android? I am working on a chess clock and would like to make the text for the top user readable by him. I already have the XML set up exactly how I want it so If its possible to keep my XML file for the rest of the content view I would greatly appreciate that method. Thank you every one.
 
Duc Vo
Ranch Hand
Posts: 254
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure how to do that with Android. But should the common solution be to put the text on a panel then rotate it by 180 degrees?
 
Misha van Tol
Ranch Hand
Posts: 56
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best way to create something like this is to create your own View and override the onDraw() method to draw onto this view.
Then you can rotate the canvas to draw items in another angle. With an xml layout it's going to be tricky, if you don't need the text
clickable there's one way, but there's some caveat. It is possible to animate the TextView rotating it 180 degrees and then keep
the state like that. Only thing is, when you load the view you can see the text animating (in a split second but it's visible).

Overall the fastest approach would be to use the xml-layout as an sketch and build the view yourself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic