-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# CommentGallery | ||
|
||
This is an Android sample for demonstrating some common scenarios, such as a grid with images and a large image viewer | ||
which supports zoom-in and zoom-out. Please feel free to let me know if your have any questions. | ||
|
||
 | ||
|
||
## Gradle Dependency | ||
|
||
Step 1. Add the JitPack repository to your build file: | ||
``` | ||
allprojects { | ||
repositories { | ||
... | ||
maven { url 'https://jitpack.io' } | ||
} | ||
} | ||
``` | ||
Step 2. Add the dependency | ||
``` | ||
dependencies { | ||
compile 'com.github.ibosong.CommentGallery:frescozoomablelib:1.0' | ||
compile 'com.github.ibosong.CommentGallery:commentgallerylib:1.0' | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
1. Usage of LargeImageGallery | ||
|
||
- Add LargeImageGallery to your xml file. | ||
|
||
``` | ||
<com.bosong.commentgallerylib.LargeImageGallery | ||
android:id="@+id/image_gallery" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"/> | ||
``` | ||
|
||
|
||
- Set image urls with `setData(List<String> urls)` method. | ||
That's all. There are also some listeners your can set: | ||
|
||
``` | ||
mLargeImageGallery.setOnImageSelectedListener(this); | ||
mLargeImageGallery.setOnItemClickListener(this); | ||
``` | ||
|
||
|
||
2. Usage of CommentImageGrid | ||
|
||
(Editing...) |