GithubHelp home page GithubHelp logo

saidjamol / tedimagepicker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from parksanggwon/tedimagepicker

0.0 1.0 0.0 26.78 MB

TedImagePicker is simple/beautiful/smart image picker

Kotlin 97.93% Java 2.07%

tedimagepicker's Introduction

TedImagePicker Android Arsenal

TedImagePicker is simple/beautiful/smart image picker

  • Support Image/Video
  • Support Single/Multi select
  • Support more configuration option
Image Select Select Album Scroller



Demo

Image Select Select Album Scroller



Setup

Gradle

Download

dependencies {
    implementation 'gun0912.ted:tedimagepicker:x.y.z'
    //implementation 'gun0912.ted:tedimagepicker:1.0.0'
}

If you think this library is useful, please press star button at upside.



How to use

1.Enable databinding

  • TedImagePicker use databinding
  • Set enable databinding in your app build.gradle
dataBinding {
    enabled = true
}

2.Start TedImagePicker/TedRxImagePicker

  • TedImagePicker support Listener and RxJavastyle

Listener

Single image
  • Kotlin
TedImagePicker.with(this)
    .start { uri -> showSingleImage(uri) }
  • Java
TedImagePicker.with(this)
        .start(new OnSelectedListener() {
            @Override
            public void onSelected(@NotNull Uri uri) {
                showSingleImage(uri);
            }
        });
TedImagePicker.with(this)
        .start(uri -> {
            showSingleImage(uri);
        });
Multi image
  • Kotlin
TedImagePicker.with(this)
    .startMultiImage { uriList -> showMultiImage(uriList) }
  • Java
TedImagePicker.with(this)
        .startMultiImage(new OnMultiSelectedListener() {
            @Override
            public void onSelected(@NotNull List<? extends Uri> uriList) {
                showMultiImage(uriList);
            }
        });
TedImagePicker.with(this)
        .startMultiImage(uriList -> {
            showMultiImage(uriList);
        });

RxJava

Single image
TedRxImagePicker.with(this)
    .start()
    .subscribe({ uri ->
    }, Throwable::printStackTrace)
Multi image
TedRxImagePicker.with(this)
    .startMultiImage()
    .subscribe({ uriList ->
    }, Throwable::printStackTrace)



Customize

  • You can customize what you want

Function

Common

  • mediaType(MediaType) : MediaType.IMAGE / MediaType.VIDEO
  • cameraTileBackground(R.color.xxx)
  • cameraTileImage(R.drawable.xxx)
  • showCameraTile(Boolean) (default: true)
  • scrollIndicatorDateFormat(String)(default: YYYY.MM)
  • title(String or R.string.xxx) (default: 'Select Image','사진 선택')
  • backButton(R.drawable.xxx)
  • zoomIndicator(Boolean) (default: true)
  • image()
  • video()
  • mediaType(MediaType) : MediaType.IMAGE / MediaType.VIDEO
  • cameraTileBackground(R.color.xxx)
  • cameraTileImage(R.drawable.xxx)
  • showCameraTile(Boolean) (default: true)
  • scrollIndicatorDateFormat(String)(default: YYYY.MM)
  • title(String or R.string.xxx) (default: 'Select Image','사진 선택')
  • backButton(R.drawable.xxx)
  • zoomIndicator(Boolean) (default: true)

Multi Select

  • selectedUri(List<Uri>)
  • buttonGravity(ButtonGravity): You can change done button location top or bottom
  • buttonText(String or R.string.xxx) (default: 'Done','완료')
  • buttonBackground(R.drawable.xxx) (default: Blue Background)
  • buttonTextColor(R.color.xxx) (default: white)
  • max(Int, String or R.string.xxx)
  • min(Int, String or R.string.xxx)

FAQ

- Do not need to check permissions?

  • Yes, TedImagePicker automatically check permission. : TedImagePicker use TedPermission
  • But If you need You can check permission before start TedImagePicker.

- java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/databinding/DataBinderMapperImpl;

  • You have to enable databinding
  • Read this



License

Copyright 2019 Ted Park

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

tedimagepicker's People

Contributors

parksanggwon avatar wooooooak avatar saidjamol avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.