3
나는 Viewflipper를 사용하여 슬라이더를 만들었으며 오른쪽에서 왼쪽으로 우리가 말할 수있는 수평 슬라이더를 의미합니다.
하지만 맨 위로 (맨 위)에서 맨 아래 (맨 아래로)의 세로 슬라이더를 만들고 싶습니다.
다음은 수평 슬라이딩 용 코드입니다.Viewflipper - 수직 슬라이더
public static Animation inFromRightAnimation(int duration) {
Animation inFromRight = 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
);
inFromRight.setDuration(duration);
inFromRight.setInterpolator(new AccelerateInterpolator());
return inFromRight;
}
public static Animation outToLeftAnimation(int duration) {
Animation outtoLeft = 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
);
outtoLeft.setDuration(duration);
outtoLeft.setInterpolator(new AccelerateInterpolator());
return outtoLeft;
}
슬라이딩을 수직으로 (상하로) 변경해야하는 이유는 무엇입니까?
실제로 최대 swype에서 작동한다, 작동하지 않을 때 작동하지 않는다. ( – Javier
좌표를 변경하고 확인한다. – Zombie