|中文文档
EasyAlbum is an easy to use media image and video selector for Android.
- Support preview;
- Support custom folder sorting;
- Support custom filter;
- Support single selection and multiple selection;
- Support showing selecting order;
- Provider 'original' option;
- Support pass selected medias to reopen album;
- Support auto refresh when album activity resuming;
- Caching media data, be fast to reopen album;
- Support preload to speed up the first time of opening album.
implementation 'io.github.billywei01:easyalbum:1.1.0'
EasyAlbum.config()
.setImageLoader(GlideImageLoader)
.setDefaultFolderComparator { o1, o2 -> o1.name.compareTo(o2.name)}
.setItemAnimator(DefaultItemAnimator())
Except for ImageLoader, which must be set, other configurations are optional.
EasyAlbum.from(this)
.setFilter(TestMediaFilter(option))
.setSelectedLimit(selectLimit)
.setOverLimitCallback(overLimitCallback)
.setSelectedList(mediaAdapter?.getData())
.setAllString(option.text)
.enableOriginal()
.start { result ->
mediaAdapter?.setData(result.selectedList)
}
EasyAlbum starts the album with "from" and ends with "start".
See the LICENSE file for license rights and limitations.