https://github.com/mayuce/imagestackviewer
This library provides an activity to show list of images in full screen with pinch to zoom support.
https://github.com/mayuce/imagestackviewer
android android-library kotlin library
Last synced: 3 months ago
JSON representation
This library provides an activity to show list of images in full screen with pinch to zoom support.
- Host: GitHub
- URL: https://github.com/mayuce/imagestackviewer
- Owner: mayuce
- License: apache-2.0
- Created: 2020-07-17T20:20:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-18T20:20:37.000Z (about 4 years ago)
- Last Synced: 2025-10-31T02:47:49.271Z (3 months ago)
- Topics: android, android-library, kotlin, library
- Language: Kotlin
- Homepage:
- Size: 1.66 MB
- Stars: 20
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
# ImageStackViewer
This library provides an activity to show images
image::https://img.shields.io/:license-Apache%202.0-yellowgreen.svg[]
image::https://img.shields.io/badge/version-1.1.0-green.svg[]
image::https://img.shields.io/badge/minSDK-19-blue.svg[]
## Preview
image::assets/stackIV.gif[200,300]
## Requirements
Add line below to your *top* level build.gradle
[source,bourne]
----
allprojects {
repositories {
/// ....
maven { url "https://jitpack.io" }
}
}
----
Add lines below to your *app* level build.gradle
[source,bourne]
----
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.jsibbold:zoomage:1.3.1'
implementation 'com.github.mayuce:ImageStackViewer:1.1.0'
----
And Sync the gradle
## Usage
[source,kotlin]
----
....
companion object {
private const val TEST_URL =
"test.png"
private const val TEST_URL_2 =
"test2.png"
}
...
StackImageViewer.openStackViewer(
activity = this,
list = listOf(
ImageData(ResourceType.UrlResource(TEST_URL)),
ImageData(ResourceType.AppResource(R.drawable.ic_launcher_foreground)),
ImageData(ResourceType.UrlResource(TEST_URL_2)),
....
), selectedItemPose = 1, view = imageView
)
----
If you don't want to *makeSceneTransitionAnimation* don't pass the imageView.
selectedItemPose parameter defines which image should show first when view initialized.
There is 3 type of images supportes. These are *app resource, URL & Base64*.
## TO-DO
- Changing background color with image. [Added with v1.1.0 by link:https://github.com/faranjit[@faranjit]]