Android PhotoView 使用教程
16lz
2021-01-23
github:
https://github.com/anymyna/ui
https://github.com/chrisbanes/PhotoView
Implementation of ImageView for Android that supports zooming, by various touch gestures.
效果:
步骤:
1、 初始化
allprojects {repositories { maven { url "https://jitpack.io" } }}
dependencies { implementation 'com.github.chrisbanes:PhotoView:1.2.6'}
2、 用法
<com.github.chrisbanes.photoview.PhotoView android:id="@+id/photo_view" android:layout_width="match_parent" android:layout_height="match_parent"/>
PhotoView photoView = (PhotoView) findViewById(R.id.photo_view);photoView.setImageResource(R.drawable.image);
更多相关文章
- Android中事件处理之LongClickListener实现步骤
- Android 初始化Setup Wizard——Provision
- Android中点击事件之FocusChangedListener实现步骤
- Android 编译流程解析01-AppPlugin初始化
- Android Studio 下载 与 安装 详细步骤
- android 软键盘隐藏 activity初始化时edittext聚焦
- Android market 发布个人免费应用的步骤