All Projects → sangcomz → Fishbun

sangcomz / Fishbun

Licence: apache-2.0
🐡FishBun is Image Picker for android.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Fishbun

Photopicker
简洁、高效的Android图片选择库,支持图片压缩、裁剪,支持多图选择
Stars: ✭ 138 (-72.83%)
Mutual labels:  image-picker
image-picka
A Firefox/Chrome extension helping you download images.
Stars: ✭ 114 (-77.56%)
Mutual labels:  image-picker
Pictureselector
🔥 Android 图片选择器(仿 IOS 图片选择控件)
Stars: ✭ 287 (-43.5%)
Mutual labels:  image-picker
Ios Nbuimagepicker
Modular image picker with Simulator-compatible AVFondation camera, assets library, filters and more.
Stars: ✭ 196 (-61.42%)
Mutual labels:  image-picker
Daguerre
Local image and video selector for Android
Stars: ✭ 33 (-93.5%)
Mutual labels:  image-picker
ConvenientImagePicker
🏞🌅🌄🎇🌇🏙🌃🌉🌁the new iOS image picker. Beautiful, delicate, and customizable.
Stars: ✭ 44 (-91.34%)
Mutual labels:  image-picker
Photopicker
Swift3.0基于PhotoKit高仿iOS微信图片选择器(photo picker like WeChat by swift)
Stars: ✭ 105 (-79.33%)
Mutual labels:  image-picker
Insgallery
📸 Instagram-like image picker for Android (一款 UI 炫酷高仿 Instagram 的图片、视频选择器)
Stars: ✭ 409 (-19.49%)
Mutual labels:  image-picker
advance image picker
Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotating, cropping, adding sticker/filters.
Stars: ✭ 91 (-82.09%)
Mutual labels:  image-picker
Abra
Your next favorite image and video picker from Gallery for Swift
Stars: ✭ 19 (-96.26%)
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 (-57.87%)
Mutual labels:  image-picker
Imagepicker
Android下的图片选择与裁剪开源库(android image picker and cropper library)
Stars: ✭ 223 (-56.1%)
Mutual labels:  image-picker
ProPicker
ProPicker is a file picker (image, video, file) library for Android. It helps you to pick any file and return the result in a convenient way
Stars: ✭ 25 (-95.08%)
Mutual labels:  image-picker
Unimgpicker
Image picker for Unity iOS/Android
Stars: ✭ 148 (-70.87%)
Mutual labels:  image-picker
Chiliphotopicker
Photo picker library for android. Let's you pick photos directly from files, or navigate to camera or gallery.
Stars: ✭ 333 (-34.45%)
Mutual labels:  image-picker
Kotlin Playground
Kotlin practice
Stars: ✭ 111 (-78.15%)
Mutual labels:  image-picker
image picker flutter
ImagePicker
Stars: ✭ 27 (-94.69%)
Mutual labels:  image-picker
Imagepicker
完全仿微信的图片选择,并且提供了多种图片加载接口,选择图片后可以旋转,可以裁剪成矩形或圆形,可以配置各种其他的参数
Stars: ✭ 4,225 (+731.69%)
Mutual labels:  image-picker
Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (+620.67%)
Mutual labels:  image-picker
ChatViewController
💬 ChatViewController, ChatBar, ImagePicker like Slack Application. Message App written in Swift
Stars: ✭ 47 (-90.75%)
Mutual labels:  image-picker

FishBun

Android Arsenal Build Status codecov Download

Get it on Google Play

FishBun is a highly customizable image picker for Android.

What's New in FishBun 1.0.0-alpha05? 🎉

  • Refactoring for rapid development🚀🚀🚀
  • Change PickerSpanCount default value (3->4)
  • target SDK 30 support
    • In API 29 or higher, the camera can be used only in the total image folder.
  • Fix Issue(#215)
  • Change DetailView statusBar color
  • Removed Picasso and added Coil
  • Support Chinese
  • Fix Issue(#223)

Customizable Styles

FishBun supports various visual styles and allows fine-tuning for details. Just to show some examples:

Default

Code
FishBun.with(WithActivityActivity.this)
        .setImageAdapter(new GlideAdapter())
        .startAlbum();
Screenshots

Dark

Code
FishBun.with(WithActivityActivity.this)
        .setImageAdapter(new GlideAdapter())
        .setMaxCount(5)
        .setMinCount(3)
        .setPickerSpanCount(5)
        .setActionBarColor(Color.parseColor("#795548"), Color.parseColor("#5D4037"), false)
        .setActionBarTitleColor(Color.parseColor("#ffffff"))
        .setArrayPaths(path)
        .setAlbumSpanCount(2, 3)
        .setButtonInAlbumActivity(false)
        .setCamera(true)
        .exceptGif(true)
        .setReachLimitAutomaticClose(true)
        .setHomeAsUpIndicatorDrawable(ContextCompat.getDrawable(this, R.drawable.ic_custom_back_white))
        .setDoneButtonDrawable(ContextCompat.getDrawable(this, R.drawable.ic_custom_ok))
        .setAllDoneButtonDrawable(ContextCompat.getDrawable(this, R.drawable.ic_custom_ok))
        .setIsUseAllDoneButton(ContextCompat.getDrawable(this, R.drawable.ic_custom_ok))
        .setAllViewTitle("All")
        .setMenuAllDoneText("All Done")
        .setActionBarTitle("FishBun Dark")
        .textOnNothingSelected("Please select three or more!")
        .exceptMimeType(listOf(MimeType.GIF))
        .setSpecifyFolderList(arrayListOf("Screenshots", "Camera"))
        .startAlbum();
Screenshots

Light

Code
FishBun.with(WithActivityActivity.this)
        .setImageAdapter(new GlideAdapter())
        .setPickerCount(50)
        .setPickerSpanCount(4)
        .setActionBarColor(Color.parseColor("#ffffff"), Color.parseColor("#ffffff"), true)
        .setActionBarTitleColor(Color.parseColor("#000000"))
        .setArrayPaths(path)
        .setAlbumSpanCount(1, 2)
        .setButtonInAlbumActivity(true)
        .setCamera(false)
        .exceptGif(true)
        .setReachLimitAutomaticClose(false)
        .setHomeAsUpIndicatorDrawable(ContextCompat.getDrawable(this, R.drawable.ic_arrow_back_black_24dp))
        .setOkButtonDrawable(ContextCompat.getDrawable(this, R.drawable.ic_check_black_24dp))
        .setAllViewTitle("All of your photos")
        .setActionBarTitle("FishBun Light")
        .textOnImagesSelectionLimitReached("You can't select any more.")
        .textOnNothingSelected("I need a photo!")
        .startAlbum();
Screenshots

How to Setup

Fishbun 0.10.0 and above only supports projects that have been migrated to androidx. For more information, read Google's migration guide.

Setting up FishBun requires to add this Gradle configuration:

repositories {
    jcenter()
}

dependencies {
    // Under the Android Plugin 3.0.0. 
    compile 'com.sangcomz:FishBun:1.0.0-alpha05'
    or
    compile 'com.sangcomz:FishBun:0.11.4' //stable version
    
    compile 'io.coil-kt:coil:0.11.0'
    or
    compile 'com.github.bumptech.glide:glide:4.9.0'
            
    // Android plugin 3.0.0 or higher.
    implementation 'com.sangcomz:FishBun:1.0.0-alpha05'
    or
    implementation 'com.sangcomz:FishBun:0.11.4' //stable version
     
    implementation 'io.coil-kt:coil:0.11.0'
    or
    implementation 'com.github.bumptech.glide:glide:4.11.0'

} 

and to allow the following permissions in your Manifest:

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

If your app targets Android 11 with compileSdk/targetSdk >= 30 then you will need to add this to the manifest (outside of the application block) in order to capture pictures with the device camera. Android documentation here:

<queries>
    <intent>
        <action android:name="android.media.action.IMAGE_CAPTURE" />
    </intent>
</queries>

How to Use

Use FishBun in an activity:

FishBun.with(YourActivity).setImageAdapter(new GlideAdapter()).startAlbum();

or in a fragment:

FishBun.with(YourFragment).setImageAdapter(new CoilAdapter()).startAlbum();

and implement OnActivityResult:

protected void onActivityResult(int requestCode, int resultCode,
                                Intent imageData) {
    super.onActivityResult(requestCode, resultCode, imageData);
    switch (requestCode) {
        case FishBun.FISHBUN_REQUEST_CODE:
            if (resultCode == RESULT_OK) {
                // path = imageData.getStringArrayListExtra(Define.INTENT_PATH);
                // you can get an image path(ArrayList<String>) on <0.6.2

                path = imageData.getParcelableArrayListExtra(INTENT_PATH);
                // you can get an image path(ArrayList<Uri>) on 0.6.2 and later
                break;
            }
    }
}

Various customizable features can be controlled by chained methods as in:

FishBun.with(YourActivity or YourFragment)
        .setImageAdapter(new GlideAdapter())
        .setIsUseDetailView(false)
        .setPickerCount(5) //Deprecated
        .setMaxCount(5)
        .setMinCount(1)
        .setPickerSpanCount(6)
        .setActionBarColor(Color.parseColor("#795548"), Color.parseColor("#5D4037"), false)
        .setActionBarTitleColor(Color.parseColor("#ffffff"))
        .setArrayPaths(path)
        .setAlbumSpanCount(2, 4)
        .setButtonInAlbumActivity(false)
        .setCamera(true)
        .setReachLimitAutomaticClose(true)
        .setHomeAsUpIndicatorDrawable(ContextCompat.getDrawable(this, R.drawable.ic_custom_back_white))
        .setOkButtonDrawable(ContextCompat.getDrawable(this, R.drawable.ic_custom_ok))
        .setAllViewTitle("All")
        .setActionBarTitle("Image Library")
        .textOnImagesSelectionLimitReached("Limit Reached!")
        .textOnNothingSelected("Nothing Selected")
        .setSelectCircleStrokeColor(Color.BLACK)
        .isStartInAllView(false)
        .exceptMimeType(listOf(MimeType.GIF))
        .setSpecifyFolderList(arrayListOf("Screenshots", "Camera"))
        .startAlbum();

attribute

      Method Name       Description                                 Default Value  
setSelectedImages Set the already selected image null
setMaxCount Maximum number of images selected 10
setMinCount Minimum number of images selected 1
setRequestCode Set RequestCode 27
setReachLimitAutomaticClose Picker automatically ends when the number of images is selected false
exceptMimeType Set file type to exclude(gif, png, jpeg, bmp, webp) NONE
setAlbumThumbnailSize Thumbnail size of album screen 70dp
setPickerSpanCount Set the picker's span count 4
setActionBarColor Set background color of action bar, statusBar color, set light theme #3F51B5, #303F9F, false
setActionBarTitleColor Set the title color of the action bar #ffffff
textOnNothingSelected Message when nothing is selected "There is no selected image."
textOnImagesSelectionLimitReached Message when the image is already all selected "Selection full. Deselect an image to choose another."
setButtonInAlbumActivity Set Selected button visibility in album screen false
setAlbumSpanCount Set the album's span count 1, 2
setAlbumSpanCountOnlyLandscape Set the album's span count when landscape 2
setAlbumSpanCountOnlPortrait Set the album's span count when portrait 1
setAllViewTitle Set the name of all views "All view"
setActionBarTitle Set the title of the action bar "Album"
setHomeAsUpIndicatorDrawable Customizing back button of the action bar null
setDoneButtonDrawable Customizing done button of the action bar null
setAllDoneButtonDrawable Customizing all done button of the action bar null
setIsUseAllDoneButton Set whether to use the Done button false
setMenuDoneText Set text for Done button null
setMenuAllDoneText Set text for All Done button null
setMenuTextColor Set text color for menu Integer.MAX_VALUE
setIsUseDetailView Set whether to use detail screen false
setIsShowCount Set whether to show counting numbers false
setSelectCircleStrokeColor Set select circle color #c1ffffff
isStartInAllView Set to start with all view false
setSpecifyFolderList Set folder to show NONE
hasCameraInPickerPage Set whether to use the camera button on picker screen false

Android M Permission

Running on Android M, FishBun checks if it has proper permission for you before reading an external storage.

Apps using FishBun

If you are using this library in your app, let me know.

Project Name Result Screen
Pandaz(unavailable now)

Multi photo resize compress crop in batch PicTools

Get it on Google Play

Contribution

Any suggestions or contributions would be welcomed. CONTRIBUTING

Feedback

Bug reports and feature requests can be submitted here (please read the instructions on how to report a bug and request feature).

License

Copyright 2019 Seokwon Jeong

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].