Skip to content

Commit 01db109

Browse files
authored
Create README.adoc
1 parent 3404129 commit 01db109

1 file changed

Lines changed: 72 additions & 0 deletions

File tree

README.adoc

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# ImageStackViewer
2+
This library provides an activity to show images
3+
4+
image::https://img.shields.io/:license-Apache%202.0-yellowgreen.svg[]
5+
6+
image::https://img.shields.io/badge/version-1.0.0-green.svg[]
7+
8+
image::https://img.shields.io/badge/minSDK-19-blue.svg[]
9+
10+
## Preview
11+
12+
image::assets/stackIV.gif[200,300]
13+
14+
## Requirements
15+
16+
Add line below to your *top* level build.gradle
17+
18+
[source,bourne]
19+
----
20+
allprojects {
21+
repositories {
22+
/// ....
23+
maven { url "https://jitpack.io" }
24+
}
25+
}
26+
----
27+
28+
Add lines below to your *app* level build.gradle
29+
30+
[source,bourne]
31+
----
32+
implementation "androidx.viewpager2:viewpager2:1.0.0"
33+
implementation 'com.github.bumptech.glide:glide:4.11.0'
34+
implementation 'com.jsibbold:zoomage:1.3.1'
35+
implementation 'com.github.mayuce:ImageStackViewer:1.0.0'
36+
----
37+
38+
And Sync the gradle
39+
40+
## Usage
41+
42+
[source,kotlin]
43+
----
44+
....
45+
companion object {
46+
private const val TEST_URL =
47+
"test.png"
48+
49+
private const val TEST_URL_2 =
50+
"test2.png"
51+
}
52+
...
53+
54+
StackImageViewer.openStackViewer(
55+
activity = this,
56+
list = listOf(
57+
ImageData(ResourceType.UrlResource(TEST_URL)),
58+
ImageData(ResourceType.AppResource(R.drawable.ic_launcher_foreground)),
59+
ImageData(ResourceType.UrlResource(TEST_URL_2)),
60+
....
61+
), selectedItemPose = 1, view = imageView
62+
)
63+
----
64+
65+
If you don't want to *makeSceneTransitionAnimation* don't pass the imageView.
66+
selectedItemPose parameter defines which image should show first when view initialized.
67+
68+
There is 3 type of images supportes. These are *app resource, URL & Base64*.
69+
70+
## TO-DO
71+
72+
- Changing background color with image.

0 commit comments

Comments
 (0)