StackLayoutManager

Introduction: :neckbeard:customized layoutmanager,let item pile up like stackview/类似最美有物卡片堆叠效果
More: Author   ReportBugs   
Tags:

中文 (因为目前代码组织得非常烂,仅仅是个玩具,如果有 Item 增删操作的话最好不要用进项目,因为 predictive 动画并不支持。当初只是模仿着写,对 RV 的一整套东西并没有理解很透彻)

A long long time ago ,i was inspired by this project android-pile-layout ,the author cannot find the appropriate math model with LayoutManager .Now i have some spare time and try to do the UI with layoutManager,barely ok with the result.

Blog

this is the relevant blog ,i hope it helps to understanding it

Display

horizontal

vertical(only top)

Demo Apk

download(vertical support)

Attention

If you don't care about item ADD REMOVE operation, this is what you want, because predictive animation is not supported yet,otherwise take care!

Usage


Config config = new Config();
config.secondaryScale = 0.8f;
config.scaleRatio = 0.5f;
config.maxStackCount = 3;
config.initialStackCount = 2;
config.space = 70;
config.parallex = 1.5f;//parallex factor
config.align= Align.RIGHT
recyclerview.setLayoutManager(new StackLayoutManager(config));
recyclerview.setAdapter(new StackAdapter(datas));
Apps
About Me
GitHub: Trinea
Facebook: Dev Tools