I have a custom view which just draws a bitmap and the view is
measured as:
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
if(mBitmap != null){
setMeasuredDimension(
mBitmap.getWidth()+PADDING,
mBitmap.getHeight()+PADDING);
}
}
The user can rotate this image and for that, I alter the bitmap as
following:
aMatrix=new Matrix();
aMatrix.setRotate(90f);
mBitmap = Bitmap.createBitmap(mBitmap, 0, 0, mWidth, mHeight, aMatrix,
false);
Problem:
If the image is rectangular, I will have to change the measurement for
the View. If I dont, the bitmap is not displayed completely inside the
bounds of the view.
I tried calling setMeasuredDimension(..) again but it somehow did not
work.
Please help.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---