我想將兩個框架佈局並排放置。我的layout.xml是:Android框架並排佈局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.agodevs.vrcamera.MainActivity" >
<FrameLayout android:id="@+id/camera_previewl" android:layout_width="fill_parent" android:layout_height="wrap_content"></FrameLayout>
<FrameLayout android:id="@+id/camera_previewr" android:layout_width="fill_parent" android:layout_height="wrap_content"></FrameLayout>
</RelativeLayout>
我只能看到一個framelayout水平。我做錯了什麼?
打我到它。雖然我個人更喜歡用總和爲1的權重來閱讀它,並且因此給它們每個值0.5。實際上,這達到了相同的目標,因爲沒有提供weightSum。 – Daneo 2014-08-28 09:47:40
不錯:) :) – GrIsHu 2014-08-28 09:48:51
這取決於我們如何管理體重。我在腦海中保持着1:10的比例 – Piyush 2014-08-28 09:48:55