Android ImageView 设置宽度或高度,其大小无法大于其父控件宽高。
比如父控件为RelativeLayout,其宽高为368*600。我现在要设置ImageView的尺寸为384*720,发现结果显示出来的居然只是充满父控件(match_...
比如父控件为RelativeLayout,其宽高为368*600。我现在要设置ImageView的尺寸为384*720,发现结果显示出来的居然只是充满父控件(match_parent),打印出来的值也是368*600,这是为什么?
用的是new RelativeLayout.LayoutParams(384,720); 展开
用的是new RelativeLayout.LayoutParams(384,720); 展开
展开全部
我也遇到同样问题,经验证
发现把RelativeLayout 改为 LinearLayout可以解决
其他解决方式尚未发现
发现把RelativeLayout 改为 LinearLayout可以解决
其他解决方式尚未发现
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
This problem can be said is unprecedented. No latecomers, answer the Chinese civilization for five thousand years, every year have a explain yourself, then later overturned, re established, so repeatedly complex for thousands of years, you are so lucky, today, I can tell you a standard answers, at least 5000 years won't be overthrown, that card is the kingly way.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询