• itfangfang
  • Java
  • 3.9MB
  • rar
  • 0
  • 1 积分
  • 1
  • 2021-04-16 12:01
![Image](/image/banner.png) # Matisse [![Build Status](]( [ ![Download]( ]( 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 | Zhihu Style | Dracula Style | Preview | |:------------------------------:|:---------------------------------:|:--------------------------------:| |![](image/screenshot_zhihu.png) | ![](image/screenshot_dracula.png) | ![](image/screenshot_preview.png)| ## Download Gradle: ```groovy repositories { jcenter() } dependencies { implementation '$latest_version' } ``` 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: ```pro -dontwarn com.squareup.picasso.** ``` If you use [Picasso]( as your image engine, add rules as Picasso's README says. And add extra rule: ```pro -dontwarn com.bumptech.glide.** ``` **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`: ```java Matisse.from(MainActivity.this) .choose(MimeType.allOf()) .countable(true) .maxSelectable(9) .addFilter(new GifSizeFilter(320, 320, 5 * Filter.K * Filter.K)) .gridExpectedSize(getResources().getDimensionPixelSize(R.dimen.grid_expected_size)) .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) .thumbnailScale(0.85f) .imageEngine(new GlideEngine()) .showPreview(false) // Default is `true` .forResult(REQUEST_CODE_CHOOSE); ``` #### Themes There are two built-in themes you can use to start `MatisseActivity`: - `` (light mode) - `` (dark mode) And Also you can define your own theme as you wish. #### Receive Result In `onActivityResult()` callback of the starting `Activity` or `Fragment`: ```java List<Uri> mSelected; @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == REQUEST_CODE_CHOOSE && resultCode == RESULT_OK) { mSelected = Matisse.obtainResult(data); Log.d("Matisse", "mSelected: " + mSelected); } } ``` #### More Find more details about Matisse in [wiki]( ## Contributing [Matisse is an Open Source Project]( ## Thanks This library is inspired by [Laevatein]( and uses some of its source code. ## License Copyright 2017 Zhihu Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
    • Android 图片选择功能
      Android 图片选择功能,这个是使用了PhotoPicker框架选择图片的demo,效果很不错,在网上找了一天,这个效果最好
    • 图片选择
    • 图片选择
      android 图片选择器,隔一段时间换图片
    • android 图片选择
      新增QQ选择风格,带数字效果 18.新增自定义 文字颜色 背景色让风格和项目更搭配 19.新增多图裁剪功能 20.新增LuBan多图压缩 21.新增单独拍照功能 22.新增压缩大小设置 23.新增Luban压缩档次设置 24.新增圆形...
    • 非常不错的图片选择
    • 图片选择
      android 图片选择器 可以选择一张,多张,或者9张。 android 图片选择器 可以选择一张,多张,或者9张。 android 图片选择器 可以选择一张,多张,或者9张。android 图片选择器 可以选择一张,多张,或者9张。
    • eclipse图片选择
    • Android 图片选择
      Android附加图片功能,图片选择器 (1)从手机中最多选择3张图片,可拍照上传; (2)选择的图片可以点击移除然后再添加新图片; (3)可以在手机包含图片的各个文件夹中随意选择等。
    • jquery图片选择
      jquery图片选择 顺时针 逆时针
    • 浏览图片选择
      为了提供良好的用户体验,App应用经常在图片进行翻页时,添加翻页动画。 本代码将模仿大街网的选择图片功能。