Glide.with(mContext)
.load(path)
.override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
.into(imageView);
.override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
就是加上这个属性,ImageView我设置了
<ImageView
android:id="@+id/float_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"
android:src="@color/picture_color_e0ff6100"
/>
然后没问题
借鉴于:https://blog.youkuaiyun.com/sinat_26710701/article/details/89384579
博客详细介绍了如何使用Glide库在Android中加载图片,并通过.override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)保持图片的原始尺寸。同时,展示了ImageView的布局设置,包括宽度和高度设置为match_parent,scaleType设置为fitCenter,确保图片适应屏幕。
1132

被折叠的 条评论
为什么被折叠?



