Android版是否有看点填充概念上类似于到iOS? [英] Does Android have Aspect Fill concept similar to iOS?

查看:143
本文介绍了Android版是否有看点填充概念上类似于到iOS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有涉及到IPhone看点内Android.I填写要包括在我的ImageView的机器人形象这一概念的概念。请给我的code片段为这个概念?

Is there any concept related to IPhone Aspect Fill within Android.I want to include this same concept on my android image on imageview. Please give me the code snippet for this concept?

推荐答案

如果你想要一个ImageView的这两个尺度上下,同时保持适当的比例,添加到您的XML:

If you want an ImageView that both scales up and down while keeping the proper aspect ratio, add this to your XML:

android:adjustViewBounds="true"
android:scaleType="centerCrop"

这一点。

这篇关于Android版是否有看点填充概念上类似于到iOS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆