Giter VIP home page Giter VIP logo

andorid-stickyheadergridview's Introduction

Andorid-StickyHeaderGridView

异步加载图片,gridview和listview同样适用,本例用的是GridView来呈现。
在滑动过程成不会去加载,可用于网络加载,本地的加载。当滑动停止,则开启异步加载图片。

引用StickyListHeaders,git地址: https://github.com/emilsjolander/StickyListHeaders

引用ImageLoader ,git地址:https://github.com/nostra13/Android-Universal-Image-Loader

##先看效果图:
###-----滑动过程中的样式:
滑动中

###-----滑动后的样式:
滑动后

###-----挤压的样式:
挤压上面textview

  public StickyGridAdapter(Context context, List<GridItem> list,
		    GridView mGridView, ImageLoader imageLoader,
	     	DisplayImageOptions options)   
  传入options,imageLoader。记得cacheInMemory(true),要缓存在内存里哦。不然可能会出现闪屏的现象。

ImageScanner类用来获取手机上所有的图片信息,用ContentProvider来获取。

具体的代码可以load下来看。注释都已经添加好了。

分享给你的小伙伴吧。 - -

andorid-stickyheadergridview's People

Watchers

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