Skip to content

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

Core-rx Module

This module is converted from core module to ReactiveX and processed.

How To

dependencies {
  implementation 'com.github.sieunju.gallery:core:$$latestVersion' // required
  implementation 'com.github.sieunju.gallery:model:$$latestVersion' // required
  implementation 'com.github.sieunju.gallery:core-rx:$latestVersion' // optional
}

Core-coroutines Module

This module is converted from core module to Coroutines and processed.

How To

dependencies {
  implementation 'com.github.sieunju.gallery:core:$$latestVersion' // required
  implementation 'com.github.sieunju.gallery:model:$$latestVersion' // required
  implementation 'com.github.sieunju.gallery:core-coroutines:$latestVersion' // optional
}

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

  • GalleryRecyclerView.
    gallery_recyclerview_example