我想讓地圖看起來固定在屏幕的底部,而ScrollView只允許在它之前滾動。問題是,當我有超過x個TextViews(在ScrollView中)時,地圖從屏幕上消失,我甚至不能通過滾動底部看到他。我怎樣才能使谷歌地圖視圖總是出現在我的佈局的底部?
我有一個包含幾個LinearLayouts與TextViews並在最後的MapView這樣的滾動型:`
...
<LinearLayout
android:id="@+id/details_neighbours_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="@dimen/details_separator_height"
android:orientation="horizontal"
android:padding="@dimen/historic_margin_separator_medium"
android:visibility="gone"
android:weightSum="3">
<TextView
android:id="@+id/neighbours_title"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/neighbours"
android:textColor="@color/color_light_grey_text"
android:textSize="@dimen/primary_text_size"
android:textStyle="bold" />
<TextView
android:id="@+id/neighbours_text"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center_vertical|right"
android:paddingLeft="4dp"
android:text=""
android:textColor="@color/color_light_grey_text"
android:textSize="@dimen/tertiary_text_size" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<!-- Map view -->
<com.google.android.gms.maps.MapView
android:id="@+id/map_view"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:visibility="visible"/>