Hi

I am trying to create a Button/ImageButton and rotating to required
degrees. I can able to rotate ImageView but same not working for
Button/ImageButton

        ImageButton homeButton = new ImageButton (context);
        homeButton.setOnClickListener(homeButtonListener);

 
homeButton.setScaleType(android.widget.ImageView.ScaleType.MATRIX);
 
homeButton.setBackgroundResource(ScannerConfiguration.homeButtonResource); //
0x7f020001

        matrix = new Matrix();
        matrix.postRotate(270F);
        //matrix.preTranslate(-((float)20 * density), -(height -10));
        matrix.postTranslate((float)20 * density, height -10);

        homeButton.setImageMatrix(matrix);

Please let me know anything needs to be done.

thanks
Chenna

-- 
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