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:

enter image description here

on dragging right:

enter image description here

on zooming in:

enter image description here

on rotating:

enter image description here

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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -