2011-07-29 5 views
1

Android 용 스 와이프 이미지 뷰어를 수행하는 방법에 대해 약간의 정보가 필요합니다. http://www.photoswipe.com/latest/examples/jquery-mobile.html#&ui-state=dialog. 정확히 listview가 있으며 새 항목을 열 때 listview 항목을 누를 때마다 필요합니다. 전체 화면에서 선택한 이미지가있는 창을 선택하고 이미지의 탭을 클릭하면 왼쪽 아래의 오른쪽 버튼이있는 부분이 이미지 위에 표시됩니다. 전체 화면 모드에서는 왼쪽 및 오른쪽으로 스 와이프하고 다른 이미지를 보여줄 수 있기를 원합니다. 쪽으로.android에서 이미지 스 와이프

어떻게하면 좋을까요? 고맙습니다. (여기 optionsVF라고한다)를 viewflipper 내부

답변

2

삽입 imageviews

당신의 onclick에

또는 무언가 :

Animation in = AnimationFactory.inFromRight(); 
in.setDuration(500); 
optionsVF.setInAnimation(in); 
Animation out = AnimationFactory.outToLeft(); 
out.setDuration(500); 
optionsVF.setOutAnimation(out); 
optionsVF.showNext(); 

내 수업 : AnimationFactory

/* 
* Copyright 2011 Sherif 
*/ 

public class AnimationFactory { 
    public static Animation inFromRight() { 
    Animation inFromLeft = new TranslateAnimation(
    Animation.RELATIVE_TO_PARENT, 1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, 
    Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f 
    ); 
    inFromLeft.setDuration(500); 
    inFromLeft.setInterpolator(new AccelerateInterpolator()); 
    return inFromLeft; 
    } 

    public static Animation outToLeft() { 
    Animation inFromLeft = new TranslateAnimation(
    Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, -1.0f, 
    Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f 
    ); 
    inFromLeft.setDuration(500); 
    inFromLeft.setInterpolator(new AccelerateInterpolator()); 
    return inFromLeft; 
    } 
} 
관련 문제