84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
这样的,我要显示9张图片,像九宫格那样去显示,然后呢,我用GridLayout去显示,设置成 3×3 的:但是,因为图片有点大,三张图片一行,放不下,然后就超出屏幕的显示范围了,怎么破?GridLayout 下,没有 weight 属性设置。。。
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
GridLayout has a weight attribute, called layout_columnWeight. Please check the documentation for details.
android:scaleType="centerCrop" It would be better if it matches the .9 format
Set the weight of the child control
android:layout_rowWeight sets the proportion of rows android:layout_columnWeight sets the proportion of columns
Note: These two properties are only available in API 21 or higher.
2- Only controls such as ImageView have: android:scaleType="centerCrop" attribute setting
GridLayout has a weight attribute, called layout_columnWeight. Please check the documentation for details.
android:scaleType="centerCrop" It would be better if it matches the .9 format
Set the weight of the child control
android:layout_rowWeight sets the proportion of rows
android:layout_columnWeight sets the proportion of columns
Note: These two properties are only available in API 21 or higher.
2- Only controls such as ImageView have: android:scaleType="centerCrop" attribute setting