GithubHelp home page GithubHelp logo

chongbo2013 / multitypeimagelayout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dcq123/multitypeimagelayout

0.0 1.0 0.0 269 KB

使用MultiType进行列表的多Item布局实现,同时包含类似微信图片预览和退出的实现,界面防【即刻】App

Java 100.00%

multitypeimagelayout's Introduction

MultiTypeImageLayout

该项目是一个Demo项目,主要用来实现列表中多个Item展现,九宫格图片展示,以及类似微信的多图预览等功能。之所以没有做成Lib是由于有些实现需要根据项目的不同需求去修改,如:九宫格的展现方式,图片点击后的其他处理等,抽取出来如果有其他需求,还得在抽取的代码中修改。所以决定放在Demo中实现所有的功能。Demo中许多细节也都处理过,所以可以作为一种实现参考。

多Item列表

列表界面仿即刻APP的消息列表页,里面包含不同的Item布局,使用MultiType实现,该Lib提供了详细的使用文档,对于多Item布局非常方便。

九宫格图片展示

九宫格图片展示其实使用的是GridLayoutManager中提供的setSpanSizeLookup()方法,用来设置每个Item占据的Span。具体可参考ImgGridLayoutManager类。

图片预览

图片预览效果类似与微信的图片预览,进入预览时有共享动画,可拖动退出图片预览。由于Gif过大所以只能放置链接。

图片预览转场动画

拖动图片退出预览动画

图片预览的处理实现,使用WeixinPhotoViewer,它是在PhotoView的基础上实现了预览时类似与微信的转场效果。该Demo在此基础上添加了拖动退出图片预览的功能。

感谢

Demo主要使用了MultiTypeWeixinPhotoViewer并在此基础上根据自己的需求进行了改造。特此感谢。

  1. MultiType
  2. WeixinPhotoViewer

multitypeimagelayout's People

Contributors

dcq123 avatar

Watchers

ferris 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.