android - Drag,Zoom or Rotate an ImageView -
here class performs drag, zoom , rotate of imageview.
xml
<?xml version="1.0" encoding="utf-8"?> <framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <imageview android:id="@+id/imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaletype="matrix" android:src="@drawable/butterfly" /> </framelayout> but done on matrix of imageview using imageview.setimagematrix(matrix);
not actual image view.
hence below results:
initial imageview:

on dragging right:

on zooming in:

on rotating:

is there way can modify imageview change per it's matrix?
you can call view.setrotation(), view.setpivotx(), view.setpivoty(), view.setscalex(), view.setscaley(), view.settranslationx() , view.settranslationy() ond view including imageview.
reference: http://developer.android.com/reference/android/view/view.html
Comments
Post a Comment