Skip to content
使用RecyclerView,自定义LayoutManager实现旋转木马相册效果
Java
Branch: master
Clone or download
Latest commit 4cc27e0 May 23, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app 使用动态计算Item位置信息方法,解决item过多导致内存占用递增,卡顿问题 May 14, 2018
coverflow
gif 1,加入效果gif图 Apr 18, 2017
gradle/wrapper 1,首次提交代码 Apr 18, 2017
.gitignore 1,解决嵌套ViewPager滑动冲突 Jul 26, 2017
LICENSE Update LICENSE Apr 3, 2018
README.md Update README.md May 23, 2018
build.gradle 1,分离coverflow为独立的module Apr 26, 2017
gradle.properties 1,首次提交代码 Apr 18, 2017
gradlew 1,解决设置item点击事件后滑动冲突 Jul 27, 2017
gradlew.bat 1,首次提交代码 Apr 18, 2017
settings.gradle 1,分离coverflow为独立的module Apr 26, 2017

README.md

RecyclerCoverFlow

使用RecyclerView,自定义LayoutManager实现旋转木马相册效果

image

Gradle依赖

请查看最新版本:Release

如:compile 'com.chenlittleping:recyclercoverflow:1.0.6'

使用方式

1,xml中加入

    <recycler.coverflow.RecyclerCoverFlow
            android:id="@+id/list"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
    </recycler.coverflow.RecyclerCoverFlow>

2,Activity中初始化,其中Adapter与RecyclerView的Adapter完全一致

    mList = (RecyclerCoverFlow) findViewById(R.id.list);
    //        mList.setFlatFlow(true); //平面滚动
    mList.setAdapter(new Adapter(this));
    mList.setOnItemSelectedListener(new CoverFlowLayoutManger.OnSelected() {
        @Override
        public void onItemSelected(int position) {
            ((TextView)findViewById(R.id.index)).setText((position+1)+"/"+mList.getLayoutManager().getItemCount());
        }
    });

实现原理:

https://www.jianshu.com/p/1837a801e599

You can’t perform that action at this time.