Android 如何用一个手势缩放两个图像视图?
我想将缩放手势传递给另一个imageView,或者使用收缩缩放来缩放两个imageView 我正在使用这个图书馆 它已经有了缩放、平移、双击侦听器 现在我的目标是当我捏/缩放最顶层时,两个图像都将被缩放,包括其后面的图像Android 如何用一个手势缩放两个图像视图?,android,imageview,zooming,gestures,Android,Imageview,Zooming,Gestures,我想将缩放手势传递给另一个imageView,或者使用收缩缩放来缩放两个imageView 我正在使用这个图书馆 它已经有了缩放、平移、双击侦听器 现在我的目标是当我捏/缩放最顶层时,两个图像都将被缩放,包括其后面的图像 <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/my
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/my_frame"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/background" >
<com.polites.android.GestureImageView
android:id="@+id/image_areas"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitCenter"
android:src="@drawable/p2_ship_mask"
android:visibility="invisible" />
<com.polites.android.GestureImageView
android:id="@+id/image"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitCenter"
android:src="@drawable/p2_ship_default" />
</FrameLayout>
您可以从缩放监听器中正在缩放的图像视图中获取缩放值,并将其设置为另一个图像视图的值。获得它。。。我创建了设置第二个imageview的比例和位置的方法,并重新绘制了它
这是我的密码
imageAreas.setScale(iv.getScale());
imageAreas.setPosition(iv.getImageX(), iv.getImageY());
imageAreas.redraw();