GithubHelp home page GithubHelp logo

layoutmanagerdemo's Introduction

LayoutManagerDemo

利用自定义LayoutManager 的一些实战实例。

相关博文:

流式布局

仿探探、人人影视 卡片层叠 炫动滑动布局

If you like, point a star .Thank you very much!

喜欢随手点个star 多谢

在哪里找到我:

我的github:

https://github.com/mcxtzhang

我的CSDN博客:

http://blog.csdn.net/zxt0601

我的稀土掘金:

http://gold.xitu.io/user/56de210b816dfa0052e66495

我的简书:

http://www.jianshu.com/users/8e91ff99b072/timeline


效果一览:

仿探探、人人影视 卡片层叠 炫动滑动布局

探探皇帝翻牌子即视感

探探皇帝翻牌子即视感

人人美剧订阅界面

人人美剧订阅界面

可配置参数(同时显示6页):

人人美剧订阅界面

流式布局

这里写图片描述

艾玛,换成妹子图后貌似好看了许多,我都不认识它了,好吧,项目里它一般长下面这样:

这里写图片描述

往常这种效果,我们一般使用自定义ViewGroup实现,我以前也写了一个。自定义VG实现流式布局

使用:

Step 1. 在项目根build.gradle文件中增加JitPack仓库依赖。

    allprojects {
		repositories {
			...
			maven { url "https://jitpack.io" }
		}
	}

Step 2. Add the dependency

    dependencies {
	        compile 'com.github.mcxtzhang:LayoutManagerDemo:V1.0.0'
	}

Step 3. 仿探探、人人影视 卡片层叠 炫动滑动布局:

以后老板让你做这种效果,你只需要:

        CardConfig.initConfig(this);
        ItemTouchHelper.Callback callback = new RenRenCallback(mRv, mAdapter, mDatas);
        ItemTouchHelper itemTouchHelper = new ItemTouchHelper(callback);
        itemTouchHelper.attachToRecyclerView(mRv);

如果需要定制特殊的参数,例如显示6层:

		 CardConfig.MAX_SHOW_COUNT = 6;

流式布局:

        mRv.setLayoutManager(new FlowLayoutManager());

layoutmanagerdemo's People

Contributors

mcxtzhang avatar

Watchers

yangliu avatar

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.