Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nshmura/SnappyImageViewer
Android Image Viewer inspired by StackOverflow's with swipe-to-dimiss and moving animations.
https://github.com/nshmura/SnappyImageViewer
Last synced: 3 months ago
JSON representation
Android Image Viewer inspired by StackOverflow's with swipe-to-dimiss and moving animations.
- Host: GitHub
- URL: https://github.com/nshmura/SnappyImageViewer
- Owner: nshmura
- Created: 2016-09-14T17:27:19.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-14T04:12:55.000Z (over 7 years ago)
- Last Synced: 2024-06-16T05:35:52.565Z (5 months ago)
- Language: Java
- Homepage:
- Size: 13.8 MB
- Stars: 102
- Watchers: 7
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-android-ui - SnappyImageViewer - 安卓图片视图 (图片)
README
# SnappyImageViewer
Android Image Viewer inspired by StackOverflow's with swipe-to-dimiss and moving animations.
## Getting Started
In your `build.gradle`:
```gradle
repositories {
jcenter()
}dependencies {
compile 'com.nshmura:snappyimageviewer:1.1.0'
}
```In your layout file:
```xml
```Setup the `SnappyImageViewer`:
```java
SnappyImageViewer snappyImageViewer = (SnappyImageViewer) findViewById(R.id.snappy_image_viewer);
snappyImageViewer.setImageResource(R.drawable.sample);
snappyImageViewer.addOnClosedListener(new SnappyImageViewer.OnClosedListener() {
@Override
public void onClosed() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().setSharedElementReturnTransition(new Fade(Fade.IN));
}
ActivityCompat.finishAfterTransition(ImageViewerActivity.this);
}
});
```## TODO
- Pinch to Zoom
- Embed in ViewPager
- Add `ImageViwerActivity` in library## Contributions
Your contributions always welcome!
## License
```
Copyright (C) 2016 nshmuraLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```