FishBun


Source link: https://github.com/sangcomz/FishBun

FishBun

FishBun is a highly customizable image picker for Android.

What's New in FishBun 0.7.7?

  • Thanks to mycoboco, README.md has become more beautiful 👏👏👏
  • Support Oreo ( #105)

Customizable Styles

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

Default

Code
FishBun.with(WithActivityActivity.this)

.MultiPageMode()

.startAlbum();
Screenshots

Dark

Code
FishBun.with(WithActivityActivity.this)

.MultiPageMode()

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

.setOkButtonDrawable(ContextCompat.getDrawable(this, R.drawable.ic_custom_ok))

.setAllViewTitle("All")

.setActionBarTitle("FishBun Dark")

.textOnNothingSelected("Please select three or more!")

.startAlbum();
Screenshots

Light

Code
FishBun.with(WithActivityActivity.this)

.MultiPageMode()

.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

Setting up FishBun requires to add this Gradle configuration:

repositories {

  jcenter() 
}
  dependencies {

  compile('com.sangcomz:FishBun:0.7.7@aar') {

transitive = true
  
}
 
}
 

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" /> 

How to Use

Use FishBun in an activity:

FishBun.with(YourActivity).MultiPageMode().startAlbum();
 

or in a fragment:

FishBun.with(YourFragment).MultiPageMode().startAlbum();
 

and implement OnActivityResult:

protected void onActivityResult(int requestCode, int resultCode,

Intent imageData) {

  super.onActivityResult(requestCode, resultCode, imageData);

  switch (requestCode) {

case Define.ALBUM_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(Define.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)

.MultiPageMode()

.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")

.startAlbum();
 

Android M Permission

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

Contribution

Any suggestions or contributions would be welcomed.

License

Copyright 2017 Jeong Seok-Won  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. 

Resources

Library for GIF results, preview, play, share everything at one place!

Custom-Typeface is a library to add custom fonts in android. By using this library you can easily set custom font on TextView, EditText, Button, CheckBox, RadioButton and AutoCompleteTextView and other wedgets in android. You can set custom typeface easily in XML.

A simple to use library for animating shapes along a given path.

An Android library for working with last.fm API.

This library is created with the purpose to implement recyclerview with videos easily.

It is targeted at solving following problems:

  1. Flicker when scrolling.
  2. Lag or skipping frames when video starts.
  3. OutOfMemory errors.

And it has following features:

  1. Auto-play videos when in view.
  2. Auto-pause videos when not in view or partially in view.

A Horizontal picker library for android which supports both text and icons

Features:

  • Supports icons and text or a mixture of both as items of the picker.
  • Tap or scroll horizontally to select the items.
  • Supports drawables, selectors and text highlighting using selectors.
  • Selection change listener to monitor the current selected item.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes