Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chenlittleping/recyclercoverflow
使用RecyclerView,自定义LayoutManager实现旋转木马相册效果
https://github.com/chenlittleping/recyclercoverflow
android coverflow recyclerview
Last synced: 4 days ago
JSON representation
使用RecyclerView,自定义LayoutManager实现旋转木马相册效果
- Host: GitHub
- URL: https://github.com/chenlittleping/recyclercoverflow
- Owner: ChenLittlePing
- License: apache-2.0
- Created: 2017-04-18T02:51:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-01T01:59:52.000Z (about 4 years ago)
- Last Synced: 2024-10-14T08:29:07.285Z (about 1 month ago)
- Topics: android, coverflow, recyclerview
- Language: Java
- Size: 15 MB
- Stars: 834
- Watchers: 18
- Forks: 152
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RecyclerCoverFlow
使用RecyclerView,自定义LayoutManager实现旋转木马相册效果![image](https://github.com/ChenLittlePing/RecyclerCoverFlow/blob/master/gif/demo.gif)
## Gradle依赖
请查看最新版本:[Release](https://github.com/ChenLittlePing/RecyclerCoverFlow/releases)如:`compile 'com.chenlittleping:recyclercoverflow:1.0.6'`
## 使用方式
### 1,xml中加入
```xml
```
### 2,Activity中初始化,其中Adapter与RecyclerView的Adapter完全一致
```java
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