Skip to content

Android Gallery Libaray 🤩! And Simple is Best!

License

Notifications You must be signed in to change notification settings

sieunju/gallery

Repository files navigation

Android Gallery Library (Simple is Best 🤩).

AndroidMinSdkVersion AndroidTargetSdkVersion

HowTo

  • Project Gradle
allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}
  • We have classified it by 'features' so that only the necessary features can be added and used. (AKA. Multi-module)

Example

Example

Core Module

Wiki

How To

dependencies {
  implementation 'com.github.sieunju.gallery:core:$latestVersion'
}

Simple Description

  • GalleryProviderImpl Example (Using Hilt Library!!)
import com.gallery.core.Factory
import com.gallery.core.GalleryProvider

@InstallIn(SingletonComponent::class)
@Module
internal class CoreModule {
  @Singleton
  @Provides
  fun provideGalleryCore(
    @ApplicationContext context: Context
  ): GalleryProvider = Factory.create(context)
}

java.lang.ClassCastException Error?!

Issue Link.

[Solution] kotlin version update! 🙏

project.gradle
classpath "com.android.tools.build:gradle:7.1.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"

Edit Module

Wiki

How To

dependencies {
  implementation 'com.github.sieunju.gallery:edit:$latestVersion'
}

Simple Description

  • FlexibleImageEditView.

    • This is a view class that allows you to zoom in, zoom out, and move through gestures.
    • When the image is out of the area, there is a logic to reposition it. It's similar to adding an Instagram story.
    • Preview.

    flexibleimage_example

  • CropImageEditView.

Ui Module

Wiki

How To

dependencies {
  implementation 'com.github.sieunju.gallery:ui:$latestVersion'
}
  • Simple is Best
PhotoPickerBottomSheet()
    .setCameraUri(getCameraUri())
    .setMaxCount(5)
    .setSubmitListener {
        // submit callback
    }
    .setCancelListener {
        // cancel callback
    }
    .setMaxSelectedListener {
        // max selected callback
    }
    .simpleShow(childFragmentManager)