2

How do I flip TextView horizontally in android (Not looking for suggestions using anything other than a TextView). The text should appear as if it is seen through the mirror. How do I achieve this?

Ragunath Jawahar
  • 19,513
  • 22
  • 110
  • 155
  • 2
    I haven't yet spent a lot of time with Android on a UI level, but in Java I'd look at overriding the paint method and doing some sort of paint; rotate; paint; trick... something similar maybe could work here... – Petriborg Jan 03 '11 at 14:57
  • 1
    yes, writing a custom TextView overriding onDraw() seems the only way, but it shouldn't be that hard if you only need to draw text. TextView.onDraw() doesn't look that simple, you could look for some vertical text example, it's a similar problem. – bigstones Jan 03 '11 at 15:27
  • 2
    for vertical text look here: http://stackoverflow.com/questions/1258275/vertical-rotated-label-in-android – bigstones Jan 03 '11 at 15:30

1 Answers1

0

I can't guarantee this will work, but it seems like it should. Try using the AndroidCharacter.Mirror() method described here: http://developer.android.com/reference/android/text/AndroidCharacter.html

Matt
  • 5,404
  • 3
  • 27
  • 39
  • Nope, didn't work. May be this works only for certain fonts that have mirror characters. I also tried the AndroidCharacter.mirror(char[], int, int) but didn't work :-( Thank you for your time Matt. – Ragunath Jawahar Jan 04 '11 at 03:01
  • It's alright dude. Good luck with this, I'll keep trying to think of possible solutions. – Matt Jan 15 '11 at 22:14