StackCardLayoutManager
Android 自定义RecyclerView.LayoutManager,卡片式层叠效果
Install / Use
/learn @MrsLEO/StackCardLayoutManagerREADME
StackCardLayoutManager
Android 自定义RecyclerView.LayoutManager,卡片式层叠效果
效果见下图:

3. Use:
1.直接设置layoutManager为StackCardLayoutManager即可
2.可使用StackCardLayoutManager.StackConfig对一些相关属性做配置。
Attributes
| attr 属性 | description 描述 | value 属性值 | |-----------|-----------------|-------------| | space | 间距 | int,默认60 | | stackCount | 可见数 | int,默认3 | | stackPosition | 初始可见的位置 | int,默认0 | | stackScale | 缩放比例 | float,[0.0,1.0],默认0.9 | | parallex | 视差因子 | float,[1.0,2.0],默认1f | | isCycle | 是否能无限循环,若列表数为1不允许无限循环 | boolean,默认false | | isAutoCycle | 若能无限循环,是否自动开始循环 | boolean,默认false | | autoCycleTime | 自动循环时间间隔,毫秒 | int,默认3000 | | isAdjustSize | 是否重新校准调整RecyclerView宽高 | boolean,默认false | | direction | 摆放方向:LEFT,TOP,RIGHT,BOTTOM | StackDirection,默认StackDirection.RIGHT |
Method
1.setOnPositionChangeListener
设置位置改变监听
注:
1.若出现列表嵌套列表的情况,建议将isAdjustSize设置为true
2.StackCardLayoutManager未对RecyclerView及其item的padding及margin做过多考虑,使用时请自定注意
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
Security Score
Audited on Jul 31, 2024
