将元素添加到布局(本例中为LinearLayout)时,元素的两侧会有一个空白区域,但属性layout_width是“ match_parent”。为什么?Android - LinearLayout右侧和右侧的空白空间
以下是截图: http://s32.postimg.org/o4vr8kzbp/device_2016_07_30_001720.png 代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="500dp"
android:background="@color/blue"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>
不禁不看,你已经尝试过。发布xml文件。 – Nerd
@Nerd是的,我发布了它。 – Fidelis