在当前工程的build.gradle里面添加这行代码 allprojects { repositories { maven { url "https://jitpack.io" } } } 然后在你自己的项目的build.gradle里面添加这行代码 dependencies { compile 'com.github.chrisbanes:PhotoView:2.1.3' }//photoView依赖下面这个也可以 compile 'com.github.chrisbanes.photoview:library:+' 下面是XML里面的使用 <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);
最后
以上就是勤恳小海豚最近收集整理的关于PhotoView图片放大缩小使用方法的全部内容,更多相关PhotoView图片放大缩小使用方法内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复