第一步:导入依赖
implementation 'com.bm.photoview:library:1.4.1'
第二步:XML布局
xmlns:tools="http://schemas.android.com/tools"
<com.bm.library.PhotoView
android:id="@+id/photoview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:adjustViewBounds="true"
tools:src="@mipmap/ic_launcher"
tools:targetApi="lollipop"></com.bm.library.PhotoView>
第三步:
PhotoView photoview= this.findViewById(R.id.photoview);
ButterKnife.bind(this);
//传过来的url地址
Intent intent = getIntent();
String url = intent.getStringExtra("key");
photoview.enable();
Glide.with(this).load(url).into(photoview);
最后
以上就是清脆手套最近收集整理的关于图片缩大,缩小的全部内容,更多相关图片缩大内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复