-2

I am trying to generate a mirrored image for a TextView.

One of the simple solutions seems to be setting textDirection as "Right to Left" i.e.

         textView.setTextDirection(View.TEXT_DIRECTION_RTL);

However, this only seems to work for api level 17 and above.

Not being familiar to TextViewCompat .. i am unable to decode how to use this functionality for api level 10.

  • Question is: - How do I use textView.setTextDirection() method for api level 10 ??

Any pointers are really appreciated !!

Deep
  • 673
  • 1
  • 10
  • 23
  • TEXT_DIRECTION_RTL won't mirror your characters. It will just "mirror the gravity" of the view. It is meant to be used with Right to Left writing systems, like that one used in arabic. Maybe you should reformulate your question to be more goal oriented... – mdelolmo Jun 29 '15 at 19:44

1 Answers1

0

May not be optimal solution, but it should work.

Take a snapshot of the view (TextView in this case) and then flip the image horizontally when displaying it.

How to programmatically take a screenshot in Android?

Example on flipping:

http://shaikhhamadali.blogspot.com/2013/08/image-flipping-mirroring-in-imageview.html

Community
  • 1
  • 1
km86
  • 475
  • 3
  • 6
  • Thanks .. but I am looking for a simpler solution. Quiet simply the backward example for TextViewCompat – Deep Jun 29 '15 at 19:04