I'm using this class to add a zoomable relative layout in my application. And my layout is this.
<com.example.zoomablerelativelayoutexample.ZoomableRelativeLayout
android:layout_width="500dp"
android:layout_height="500dp"
android:layout_alignParentTop="true"
android:background="#000" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="124dp"
android:layout_marginLeft="64dp"
android:layout_toRightOf="@+id/imageButton1"
android:src="@drawable/ic_launcher" />
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="52dp"
android:layout_marginTop="131dp"
android:src="@drawable/ic_launcher" />
</com.example.zoomablerelativelayoutexample.ZoomableRelativeLayout>
Here is the screen shot of the main xml;
Problem is this; when I do the pinch zoom in the RelativeLayout zooms normally. And after making zoom when I move the layout, it moves endless.
I want to limit the move event with the borderline. How can I do it?