我面临一个问题,即如何在手机和平板电脑之间保持相同的布局。
原因是我的大多数图片都是固定尺寸的。因此,从手机切换到平板电脑时会出现问题。
我的活动布局如下。
<relativelayout> - with match_parent for both width and height
<linearlayout> - with match_parent for both width and height
<linearlayout> - with match_parent for for width only and match_content for height
<imageview> - fixed size - 94 dp and 32 dp
有没有可能像在html中一样给宽度设置百分比而不是固定的dp?这样它可以自动调整到父容器的宽度。
谢谢!