我在看《第一行代码》中的碎片部分,对其中的这部分代码没有办法理解
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
android:id="@+id/left_fragment"
android:name="com.example.qiao.fragmenttest.LeftFragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2" />
android:id="@+id/right_layout"
android:layout_width="10dp"
android:layout_weight="1"
android:layout_height="match_parent">
android:id="@+id/right_fragment"
android:name="com.example.qiao.fragmenttest.RightFragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
我的主要困惑是不理解这里为什么要添加FrameLayout,作用是覆盖在fragment上,类似于浮动的效果吗?
同时
android:id="@+id/right_layout"
android:layout_width="10dp"
android:layout_weight="1"
android:layout_height="match_parent">
这部分属性到底作用在哪里又该怎么理解,如何确定他们的大小。