我试着让两个LinearLayout彼此相邻,但下面的代码不会工作,它将它们放在最前面。LinearLayout彼此相邻
你能否请帮忙。或者你有更好的主意?
谢谢?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="0.5"
android:background="#999">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="0.5"
android:background="#977000">
</LinearLayout>
</LinearLayout>