我对Android开发很新,并且一直关注指南。 我有一个抽屉布局,每个不同的屏幕都有不同的片段。 片段内部的另一个是我用于谷歌地图的SupportMapFragment。 这样做的是,一旦我将片段放置在线性布局中,我就不能在它填充到屏幕底部之后放置按钮或项目。
<RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:orientation="vertical">
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="16dp" />
<Button
android:id="@+id/btn_submitReport"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Button" />
</LinearLayout>
</RelativeLayout>
我可以将片段高度更改为350dp,它显然可以正常工作,但我想知道它是否可以自动完成,以便对于较大的设备,按钮向下等等会更长。
What I basically am trying to achieve
由于