pookie13 / ZoomImage

A simple Repo that help to make your image zoomable on touch or pin to zoom.
8 stars 17 forks source link

ZoomImage

A simple Repo that help to make your image zoomable on touch or pin to zoom. for this purpose you just copy and past this class into your code. and put below lines into your xml files like:

<your_packege_name.TouchImageView
        android:id="@+id/frag_imageview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitCenter"
        android:src="https://github.com/pookie13/ZoomImage/raw/master/@drawable/default_flag"
        android:transitionName="@string/transition_name_phone" /> 

instead of define your image view like:

  <ImageView
        android:id="@+id/frag_imageview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitCenter"
        android:src="https://github.com/pookie13/ZoomImage/raw/master/@drawable/default_flag"
        android:transitionName="@string/transition_name_phone" />

and now into your Activity find this view like:


     tv.setImageResource(R.drawable.ic_play);```

     so thats it. now your simple image will able to pin to zoom and double tap image view to zoom.