All Projects → qiujayen → Daguerre

qiujayen / Daguerre

Licence: other
Local image and video selector for Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Daguerre

React Native Syan Image Picker
React-Native 多图片选择 支持裁剪 压缩
Stars: ✭ 556 (+1584.85%)
Mutual labels:  image-picker
Gallerypicker
Gallery Picker allows you to design a custom gallery for image/ video picker in your android projects.
Stars: ✭ 76 (+130.3%)
Mutual labels:  image-picker
Unimgpicker
Image picker for Unity iOS/Android
Stars: ✭ 148 (+348.48%)
Mutual labels:  image-picker
Prismasimpleimagepicker
This is a copy of the Prisma APP. Reproduce Prisma custom camera, image picker and picture editor
Stars: ✭ 594 (+1700%)
Mutual labels:  image-picker
Weex Image Crop Picker
iOS/Android image picker with support for camera, configurable compression, multiple images and cropping porting from
Stars: ✭ 42 (+27.27%)
Mutual labels:  image-picker
Image Picker
An easy to use, highly configurable image picker for your chat application.
Stars: ✭ 94 (+184.85%)
Mutual labels:  image-picker
Imagepicker
完全仿微信的图片选择,并且提供了多种图片加载接口,选择图片后可以旋转,可以裁剪成矩形或圆形,可以配置各种其他的参数
Stars: ✭ 4,225 (+12703.03%)
Mutual labels:  image-picker
Facebookimagepicker
FacebookImagePicker is Facebook album photo picker written in Swift.
Stars: ✭ 220 (+566.67%)
Mutual labels:  image-picker
Bsimagepicker
A multiple image picker for iOS
Stars: ✭ 1,171 (+3448.48%)
Mutual labels:  image-picker
Photopicker
简洁、高效的Android图片选择库,支持图片压缩、裁剪,支持多图选择
Stars: ✭ 138 (+318.18%)
Mutual labels:  image-picker
Imagepicker
📸Image Picker for Android, Pick an image from Gallery or Capture a new image with Camera
Stars: ✭ 623 (+1787.88%)
Mutual labels:  image-picker
React Native Image Picker
🌄 A React Native module that allows you to use native UI to select media from the device library or directly from the camera.
Stars: ✭ 7,431 (+22418.18%)
Mutual labels:  image-picker
Photopicker
Swift3.0基于PhotoKit高仿iOS微信图片选择器(photo picker like WeChat by swift)
Stars: ✭ 105 (+218.18%)
Mutual labels:  image-picker
Alerts And Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...
Stars: ✭ 5,267 (+15860.61%)
Mutual labels:  image-picker
Ios Nbuimagepicker
Modular image picker with Simulator-compatible AVFondation camera, assets library, filters and more.
Stars: ✭ 196 (+493.94%)
Mutual labels:  image-picker
Fishbun
🐡FishBun is Image Picker for android.
Stars: ✭ 508 (+1439.39%)
Mutual labels:  image-picker
Mtimagepicker
A WeiXin like multiple imagepicker and video picker using either PhotoKit or AssetsLibrary
Stars: ✭ 79 (+139.39%)
Mutual labels:  image-picker
Imagepicker
Android下的图片选择与裁剪开源库(android image picker and cropper library)
Stars: ✭ 223 (+575.76%)
Mutual labels:  image-picker
Image Upload Example
Demonstration of how to upload images from the ImagePicker, using a node backend to upload to S3
Stars: ✭ 214 (+548.48%)
Mutual labels:  image-picker
Kotlin Playground
Kotlin practice
Stars: ✭ 111 (+236.36%)
Mutual labels:  image-picker

Daguerre

一个Android本地图片和视频的选择器

  • 可以在Activity或Fragment中使用
  • 选择图片支持多种格式,如:JPEG, PNG, GIF
  • 选择视频支持多种格式,如:3GP, MPEG, MP4
  • 可以自定义主题样式
  • 可自定义不同的图片加载器
Select Image 1 Select Image 1 Preview

Download Demo Apk

apk

How to

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
	implementation 'com.github.qiujayen:Daguerre:last-version'
}

This library dependencies

implementation 'com.android.support:appcompat-v7:version code'
implementation 'com.android.support:recyclerview-v7:version code'
implementation 'com.github.chrisbanes:PhotoView:version code'

How to use Daguerre?

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 use

Daguerre.with(this)
        .theme(R.style.CustomTheme) // 设置主题样式,不设置则使用默认主题
        .spanCount(3) // 设置列表列数,默认为3
        .maxSelectable(3) // 设置最大选择数据,默认为1
        .mimeType(MimeType.IMAGE, MimeType.JPEG) // 设置mimeType,默认会显示所有图片与视频
        .setImageLoader(new ImageLoader()) // 设置图片加载器,必须设置的参数,否则图片等资源无法显示
        .launch(REQUEST_CODE);

Obtain Result

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == PHOTO && resultCode == RESULT_OK) {
        ArrayList<String> photos = Daguerre.obtainResultSet(data);
    } else if (requestCode == VIDEO && resultCode == RESULT_OK) {
        String videoPath = Daguerre.obtainResult(data);
    }
}

Themes attrs

attr                           doc default value
daguerreCheckButtonColor       选择图片 CheckBox 按钮颜色 white
daguerreActionDrawableColor   ActionBar 菜单图标颜色 white
daguerreActionModeDrawableColor ActionMode 确认按钮图标颜色 white
daguerreBadgeColor             列表中标记视频的图标颜色 white

Themes Style

参考Activity主题样式设置

More

Find more details about Daguerre in wiki.

Thanks

This library is inspired by Matisse and uses some of its source code.

License

Copyright 2017 QiuJay 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].