Hi,
I want to create a TextView with the text mirrored vertically.
I tried this code, but it doesn't show anything...

Does anyone have an idea?

/** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);



          setContentView(R.layout.main);

          rl = (RelativeLayout) findViewById(R.id.Rellayout);

          MirrorView speed = new MirrorView(getBaseContext());

          speed.setText("Testtest");

          rl.addView(speed);


}


     private class MirrorView extends TextView {

          public MirrorView(Context context) {
               super(context);
               // TODO Auto-generated constructor stub
          }


          @Override
          protected void onDraw(Canvas canvas) {


               canvas.scale((float) -1.0f, (float) 1.0f, (float)
(canvas
                         .getWidth() / 2), (float) (canvas.getHeight
() / 2));
               super.onDraw(canvas);
          }
     }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to