Hi, everyone,
I;m testing to scale an image, and I got a problem:

main.xml:
<ImageView
    android:id="@+id/iv"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    />

onCreate():
iv = (ImageView) findViewById(R.id.iv);
iv.setImageResource(R.drawable.icon);

onTouchEvent():
Matrix mtrx = iv.getImageMatrix();
mtrx.postScale(2, 2);
iv.setImageMatrix(mtrx);
iv.setScaleType(ScaleType.MATRIX);
iv.invalidate();

when I touch the screen the image does scaled, but the size of
imageview does not change, so I can only see part of the image. Any
way to map the imageview to the Matrix(or the drawable)? I add
android:adjustViewBounds="true" but it not works.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to