Matisse.rar

  • itfangfang
    了解作者
  • Java
    开发工具
  • 3.9MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 1
    下载次数
  • 2021-04-16 12:01
    上传日期
图片选择器,支持对手机相册图片进行选择,查看预览
Matisse.rar
内容介绍
![Image](/image/banner.png) # Matisse [![Build Status](https://travis-ci.org/zhihu/Matisse.svg)](https://travis-ci.org/zhihu/Matisse) [ ![Download](https://api.bintray.com/packages/zhihu/maven/matisse/images/download.svg) ](https://bintray.com/zhihu/maven/matisse/_latestVersion) 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 'com.zhihu.android:matisse:$latest_version' } ``` Check out [Matisse releases](https://github.com/zhihu/Matisse/releases) to see more unstable versions. ## ProGuard If you use [Glide](https://github.com/bumptech/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](https://github.com/square/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`: - `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`: ```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](https://github.com/zhihu/Matisse/wiki). ## Contributing [Matisse is an Open Source Project](https://github.com/zhihu/Matisse/blob/master/CONTRIBUTING.md) ## Thanks This library is inspired by [Laevatein](https://github.com/nohana/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 http://www.apache.org/licenses/LICENSE-2.0 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.新增圆形...
    • 非常不错的图片选择
      非常不错的图片选择器,功能完善,动画超赞Louvre非常不错的图片选择器,功能完善,动画超赞Louvre非常不错的图片选择器,功能完善,动画超赞Louvre非常不错的图片选择器,功能完善,动画超赞Louvre非常不错的图片...
    • 图片选择
      android 图片选择器 可以选择一张,多张,或者9张。 android 图片选择器 可以选择一张,多张,或者9张。 android 图片选择器 可以选择一张,多张,或者9张。android 图片选择器 可以选择一张,多张,或者9张。
    • eclipse图片选择
      转自于multiimageselector框架的图片选择器,里面包含android-support-v7-appcompat,multi-image-selector和引用的demo,绝对有用
    • Android 图片选择
      Android附加图片功能,图片选择器 (1)从手机中最多选择3张图片,可拍照上传; (2)选择的图片可以点击移除然后再添加新图片; (3)可以在手机包含图片的各个文件夹中随意选择等。
    • jquery图片选择
      jquery图片选择 顺时针 逆时针
    • 浏览图片选择
      为了提供良好的用户体验,App应用经常在图片进行翻页时,添加翻页动画。 本代码将模仿大街网的选择图片功能。