Attention please!
===================
This library is not supported anymore. Please, check out nice living forks!
Thanks for attention.
AndroidTouchGallery
===================
Android widget for gallery, using viewpager. Allow pinch zoom and drag for images by url.
Widget allows use it in Android > 2.0!
How to use
===================
1. Make import library folder into your IDE.
2. Make sure, that AndroidTouchGallery has included in your project as library. Check project properties, and make sure checkbox "Is library" is checked.
3. Include GalleryViewPager in your layout xml or programmatically.
```
<ru.truba.touchgallery.GalleryWidget.GalleryViewPager
android:id="@+id/viewer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
```
4. Provide one of library adapters: UrlPagerAdapter or FilePagerAdapter
For example (an Activity code):
```java
setContentView(R.layout.main);
String[] urls = {
"http://cs407831.userapi.com/v407831207/18f6/jBaVZFDhXRA.jpg",
"http://cs407831.userapi.com/v4078f31207/18fe/4Tz8av5Hlvo.jpg", //special url with error
"http://cs407831.userapi.com/v407831207/1906/oxoP6URjFtA.jpg",
"http://cs407831.userapi.com/v407831207/190e/2Sz9A774hUc.jpg",
"http://cs407831.userapi.com/v407831207/1916/Ua52RjnKqjk.jpg",
"http://cs407831.userapi.com/v407831207/191e/QEQE83Ok0lQ.jpg"
};
List<String> items = new ArrayList<String>();
Collections.addAll(items, urls);
UrlPagerAdapter pagerAdapter = new UrlPagerAdapter(this, items);
GalleryViewPager mViewPager = (GalleryViewPager)findViewById(R.id.viewer);
mViewPager.setOffscreenPageLimit(3);
mViewPager.setAdapter(pagerAdapter);
```
5. You can always check example if you miss something.
License
===================
Copyright (c) 2012-2013 Roman Truba
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
没有合适的资源?快使用搜索试试~ 我知道了~
Android查看图片,支持双击或双指缩放的Gallery(用ViewPager实现),支持本地和网络图片
共49个文件
java:15个
xml:11个
png:9个
5星 · 超过95%的资源 需积分: 11 43 下载量 196 浏览量
2015-06-14
10:58:21
上传
评论
收藏 836KB ZIP 举报
温馨提示
AndroidTouchGallery 支持双击或双指缩放的Gallery(用ViewPager实现) 相比PhotoView,在被放大后依然能滑到下一个item,并且支持直接从url和文件中获取图片,
资源推荐
资源详情
资源评论
收起资源包目录
AndroidTouchGallery-master.zip (49个子文件)
AndroidTouchGallery-master
example
res
menu
activity_main.xml 249B
drawable
icon.png 6KB
values
strings.xml 282B
layout
activity_main.xml 503B
main.xml 443B
assets
2.jpg 76KB
1.jpg 95KB
3.jpg 84KB
5.jpg 103KB
4.jpg 59KB
src
ru
truba
touchgallery
GalleryUrlActivity.java 3KB
GalleryFileActivity.java 3KB
MainActivity.java 2KB
TouchGallery.iml 2KB
project.properties 131B
AndroidManifest.xml 1KB
lint.xml 53B
library
pom.xml 2KB
res
drawable-ldpi
no_photo.png 2KB
ic_launcher.png 3KB
drawable-hdpi
no_photo.png 3KB
ic_launcher.png 9KB
drawable-xhdpi
no_photo.png 4KB
ic_launcher.png 14KB
values
strings.xml 121B
drawable-mdpi
no_photo.png 2KB
ic_launcher.png 5KB
layout
main.xml 398B
proguard-project.txt 781B
ant.properties 698B
build.xml 4KB
src
ru
truba
touchgallery
TouchView
TouchImageView.java 20KB
UrlTouchImageView.java 5KB
WrapMotionEvent.java 2KB
EclairMotionEvent.java 2KB
FileTouchImageView.java 3KB
InputStreamWrapper.java 1KB
GalleryWidget
InfinityUrlAdapter.java 2KB
GalleryViewPager.java 6KB
UrlPagerAdapter.java 2KB
BasePagerAdapter.java 3KB
InfinityFilePagerAdapter.java 3KB
FilePagerAdapter.java 2KB
project.properties 584B
README.md 511B
AndroidManifest.xml 311B
libs
android-support-v4.jar 377KB
.gitignore 2KB
README.md 3KB
共 49 条
- 1
资源评论
- Jvmlz2016-05-13不错,学习了。
tomctx
- 粉丝: 9
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- (源码)基于 JavaWeb 的超市收银系统.zip
- (源码)基于Vue和Cordova的移动端在线选座购票系统.zip
- (源码)基于C++的simpleDB数据库管理系统.zip
- (源码)基于Arduino的RTOSMMESGU实时操作系统项目.zip
- (源码)基于STM32和TensorFlow Lite框架的微语音识别系统.zip
- (源码)基于C#的支付系统集成SDK.zip
- (源码)基于Spring Cloud和Spring Boot的微服务架构管理系统.zip
- (源码)基于物联网的自动化开门控制系统 iotsaDoorOpener.zip
- (源码)基于ROS的Buddy Robot舞蹈控制系统.zip
- (源码)基于Qt框架的图书管理系统.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功