2013-01-21 9 views
0

我想缩放手势传递到另一个ImageView的或使用捏放大缩小两者的ImageView ....如何使用One Gesture缩放两个imageView?

我使用这个库https://github.com/jasonpolites/gesture-imageview

已缩放,平移,双击听众已经....

现在我的目标是当我捏/缩放最顶层两个图像将被放大,包括其背后的图像....

<?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> 

回答

0

明白了...我创造了我的设置第二imageview的规模和位置的方法和重绘...

这里是我的代码....

   imageAreas.setScale(iv.getScale()); 
       imageAreas.setPosition(iv.getImageX(), iv.getImageY()); 
       imageAreas.redraw(); 
1

您可以从012获取变焦值,这是缩放,在缩放监听器中,并将其设置为其他ImageView的值。