1

我创建了一个 iphone 应用程序,现在我被委托在 android 中执行相同的应用程序。我在 github https://github.com/thefaj/OpenFlow上使用了来自 thefaj 的 OpenFlow

但是我还没有在android上找到一个可以工作的coverflow的东西..

有没有人在 android 中有这方面的经验或知道一个好的起点?

4

3 回答 3

3

我在我的项目中使用了这段代码 http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html

您可以调整它以从某些数据源加载内容,这不是一项艰巨的工作。

于 2011-04-13T21:15:51.520 回答
1

刚刚遇到http://code.google.com/p/android-coverflow/它似乎基于 inter-fuser 代码并进行了一些优化

于 2011-11-11T16:30:46.363 回答
1

扩展 Gallery,并按如下方式覆盖此方法:

   protected boolean getChildStaticTransformation(View child, Transformation t) {
    t.clear();
    t.setTransformationType(Transformation.TYPE_MATRIX);
    final Matrix matrix = t.getMatrix();
    float childCenterPos = child.getLeft() + (child.getWidth() / 2f);
    float center = getWidth() / 2;
    float diff = Math.abs(center - childCenterPos);
    float scale = diff / getWidth();

    matrix.setScale(1 - (scale), 1 - (scale));

    return true;
}

Obviously you can do more interresting stuff with the matrix than just scaling, but this just as an example of how easy it can be done.

于 2012-03-26T12:27:22.960 回答