1、问题
局文件图片太大同步放缩后挤掉其它布局的问题
比如有个图片logo1.png,很大,在平板上图片布局写成这样
<ImageViewandroid:src="@drawable/logo1"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"android:layout_marginTop = "80dp"android:layout_marginLeft = "130dp"android:layout_marginRight = "130dp"android:layout_marginBottom = "10dp" />
这样写的问题是左右挨着边距可以,但是距离上下的布局特么也有130dp,这个日了狗吗?
2、解决办法
我们可以用LinearLayout来包裹这个图片布局,设置LinearLayout的margin属性就可以解决问题,比如如下写布局文件
<LinearLayout android:id