在Android的刷卡图片图片、Android

2023-09-06 18:39:32 作者:笑叹人生,入戏太深

我需要关于如何做一个刷卡的图像查看器Android.Something正是这样一些信息:的 http://www.photoswipe.com/latest/examples/jquery-mobile.html#&ui-state=dialog .I'm有ListView和我想每一次我点击它会打开全屏所选图像的新窗口的列表视图项,当我在图像上标签,用左,右按键底部显示出来和image.In全屏上面的一些信息模式我希望能够刷卡左侧和右侧,不同的图像显示出来。

I need a little information about how to do a swipe image viewer for Android.Something exactly like this : http://www.photoswipe.com/latest/examples/jquery-mobile.html#&ui-state=dialog .I'm have a listView and I want every time i click an listview item it opens a new windows with the selected image in fullscreen and when I tab on the image,the bottom part with the left right button shows up and some information above the image.In a fullscreen mode I want to be able to swipe left and right and different image shows up.

任何想法如何做到这一点?多谢!

Any idea how to do this?Thanks a lot!

推荐答案

一viewflipper内插入imageviews(这里称为optionsVF)

Insert imageviews inside a viewflipper (here is is called optionsVF)

在您的onClick或东西:

In your onClick or something:

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;
    }
}