Matisse
Matisse is a well-designed local image and video selector for Android. You can
- Use it in Activity or Fragment
- Select images including JPEG, PNG, GIF and videos including MPEG, MP4
- Apply different themes, including two built-in themes and custom themes
- Different image loaders
- Define custom filter rules
- More to find out yourself
Download
Gradle:
Check out Matisse releases to see more unstable versions.
ProGuard
If you use Glide as your image engine, add rules as Glide's README says.
And add extra rule:
If you use Picasso as your image engine, add rules as Picasso's README says.
And add extra rule:
Attention: The above progurad rules are correct.
How do I use Matisse?
Permission
The library requires two permissions:
android.permission.READ_EXTERNAL_STORAGE
android.permission.WRITE_EXTERNAL_STORAGE
So if you are targeting Android 6.0+, you need to handle runtime permission request before next step.
Simple usage snippet
Start MatisseActivity
from current Activity
or Fragment
:
Themes
There are two built-in themes you can use to start MatisseActivity
:
R.style.Matisse_Zhihu
(light mode)R.style.Matisse_Dracula
(dark mode)
And Also you can define your own theme as you wish.
Receive Result
In onActivityResult()
callback of the starting Activity
or Fragment
: