/ Picker

A simple and beautiful image picker

A simple and beautiful image picker

TedImagePicker

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)

Multi Select

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

GitHub