我有一个main.xml布局如下:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout>/FrameLayout>
<RelativeLayout></RelativeLayout>
<fragment></fragment>
</RelativeLayout>
现在,我要在主布局上放置透明的片段/布局,这样我就可以放置一些控制器了。
答案 0 :(得分:0)
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<fragment></fragment>
<RelativeLayout>
<!-- Your controllers go here -->
</RelativeLayout>
</FrameLayout>
框架布局将允许relativelayout和片段在彼此之上。 片段授予控件后添加相对布局是可见的。