JIANGzihao0222

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
统计
 

 

 一:

<ImageView
android:src="@drawable/yourname"//资源来源
android:scaleType="centerInside"//缩放方式
android:layout_width="200dp"//宽
android:layout_height="200dp">//长
</ImageView>
其他缩放方式:

 

二:

 

 

跳转view界限,不超过长宽高,先达到最小的边,在等比缩放。

 

<ImageView
android:src="@drawable/yourname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxHeight="200dp"//最大高度
android:maxWidth="200dp"//最大宽度
android:adjustViewBounds="true"//调整界限
>

</ImageView>


posted on   实名吓我一跳  阅读(43)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
 
点击右上角即可分享
微信分享提示