2012-11-19 5 views
0

이미지 갤러리와 같이 ImageView에서 이미지간에 변경할 내용을 구현하려고합니다.제스처를 사용하여 ImageView의 이미지 변경

나는 가로 모드에있는 이미지 뷰

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical"> 
    <HorizontalScrollView 
      android:id="@+id/hsv_ScrollImage" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:scrollbars="none"> 
      <ImageView 
       android:id="@+id/id_imgFinal" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content"/>  
     </HorizontalScrollView>  
</LinearLayout> 

내 애플 쇼 이미지를 표시하려면이 XML을 가지고,이 내가 HorizontalScrollView를 사용하고있는 이유입니다. 이제 문제가 생겼습니다. 제스처와 함께 다른 Image로 변경하려면 구현하려고했지만, HorizontalScrollView가 문제인지 여부는 알 수 없습니다. 누군가가 이걸 도와 줄 수 있습니까? 이 활동에서 가장 자주 사용되는 방법은 무엇입니까?

감사합니다.

답변

0

Here ViewPager와 함께 멋진 튜토리얼이 있습니다. Gesture-ImageView과 통합하여 줌 기능을 갤러리에 추가 할 수도 있습니다.

아! 더 나은 통합을 위해 Gesture-ImageView에 this patch을 추가하는 것을 잊지 마십시오.

0

갤러리 UI 위젯 사용 방법은 어떻습니까? 그것은 바로 이런 상황을위한 것입니다. Here's 튜토리얼 및 the reference.