我有两个片段,其中一个我想要在另一个之上,它占据了整个屏幕。我怎样才能做到这一点?
代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:opencv="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_relativelayout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<fragment
android:id="@+id/MainCameraFragment"
android:name="com.james.skullyhud.main_camera.MainCameraFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</fragment>
<fragment
android:id="@+id/map"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
class="com.google.android.gms.maps.MapFragment" >
</fragment>
</RelativeLayout>
干杯