In my android application I need to create activities zoom able. I found useful code for zooming linear layout here . But in my application couple of activities start with scrollview and this code does not recognize scrollview. How can I make pinch zoom for scrollable activity? This is one of my layout.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/scrollViewZoom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" >
<LinearLayout
android:id="@+id/wd_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical" >
<!-- Start Circle -->
<TableRow
android:id="@+id/row_circl1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:background="@color/purple_color" >
<RelativeLayout
android:id="@+id/circle_layout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/white_color" >
<ImageView
android:id="@+id/img_engin_circle1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/circle_engin_bg"
android:contentDescription="TODO" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/circle_layout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/white_color" >
<ImageView
android:id="@+id/img_engin_circle2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/circle_engin_bg"
android:contentDescription="TODO" />
</RelativeLayout>
</TableRow>
<TableRow
android:id="@+id/row_name_circle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginTop="30dp" >
<RelativeLayout
android:id="@+id/circle_name_layout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-15dp"
android:background="@color/white_color" >
<ImageView
android:id="@+id/img_name_circle1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/circle_gauge_name"
android:contentDescription="TODO" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/circle_name_layout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-15dp"
android:background="@color/white_color" >
<ImageView
android:id="@+id/img_name_circle2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/circle_gauge_name"
android:contentDescription="TODO" />
</RelativeLayout>
</TableRow>
<!-- End Circle -->
</LinearLayout>
</ScrollView>
Any idea would help me. Thanks.