GithubHelp home page GithubHelp logo

hirayclay / stacklayoutmanager Goto Github PK

View Code? Open in Web Editor NEW
446.0 9.0 62.0 51.79 MB

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

Java 100.00%
widget android-ui slide card pile stack layoutmanager recyclerview

stacklayoutmanager's Introduction

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

Why

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));

stacklayoutmanager's People

Contributors

hirayclay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stacklayoutmanager's Issues

第一个item,点击事件界面不刷新

在position 为0 的时候 onBindViewHolder里面的点击事件,比如说
holder.ivPlay.setOnClickListener {
ToastUtils.showShort("you click")
holder.tvProcess.text = "shishi"
}
holder.tvProcess.text = "shishi"
这句话不能立刻生效,需要点击多次才能生效

Slugness while scrolling

Cards are overlapping and getting stuck over others while scrolling and release in the middle of the screen and sometimes in fast scroll.

Vertical support.

I'm very interested in StackLayoutManager but I want to use in vertical recyclerView.

Thank you for your support.

设置为底部的时候,不显示

当设置为:config.align = Align.BOTTOM的时候,整个列表都不显示了,设置为:config.align = Align.TOP的时候,显示正常

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

Hi your layout manager is very good however i'm getting this error in
private int fill(RecyclerView.Recycler recycler, int dy, boolean apply) {
int delta = direction.layoutDirection * dy;
// multiply the parallex factor
if (apply)
delta = (int) (delta * parallex);
if (direction == LEFT)
return fillFromLeft(recycler, delta);
if (direction == RIGHT)

        return fillFromRight(recycler, delta);
    if (direction == TOP)
        return fillFromTop(recycler, delta);
    else return dy;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.