In meiner Android-Anwendung muss ich zoomfähige Aktivitäten erstellen. Ich habe nützlichen Code zum Zoomen des linearen Layouts here gefunden. Aber in meiner Anwendung beginnen einige Aktivitäten mit scrollview und dieser Code erkennt scrollview nicht. Wie kann ich Pinch-Zoom für scrollbare Aktivität machen? Dies ist einer meiner Layout.Wie macht man zoombare Scrollview?
<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>
Jede Idee würde mir helfen. Danke.
Bitte überprüfen Sie diesen Link: [ermöglicht Zoom-on-Scroll-view] [1] viel Glück. [1]: http://stackoverflow.com/questions/18572014/enabling-zoom-on-scroll-view –
Danke für Ihre Antwort @ Adir.el aber ich eine andere Lösung gefunden. – IndieBoy