android fragment framelayout,Android布局中FrameLayout和fragment中的使用。

我在看《第一行代码》中的碎片部分,对其中的这部分代码没有办法理解

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">

这部分属性到底作用在哪里又该怎么理解,如何确定他们的大小。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值