0
的底部我有一個由組成一個Android活動: 的FrameLayout>滾動型>的LinearLayout> ListView控件的Android LinearLayout中充入直到屏幕
我的ListView是我的最後一個組件,我想,它的高度規模將從去直到屏幕底部的前一個組件結束。 問題:不幸的是現在它的大小隻有高度大小隻有1行的大小。
我已將所有layout_height設置爲match_parent屬性,但沒有任何效果。
問題:你會知道如何讓我的ListView佔據所有空間的高度下降到可用屏幕的底部?
謝謝!
XML:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="it.bitrack.fabio.bitrack.ScheduleView"
android:layout_marginTop="60dp">
<!-- TODO: Update blank fragment layout -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="Select an asset"
android:textStyle="bold|italic" />
<Spinner
android:id="@+id/assetSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:textStyle="bold|italic" />
<LinearLayout
android:id="@+id/assetBookingLinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="Booking schedule"
android:textStyle="bold|italic" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="From: "
android:textStyle="bold|italic" />
<TextView
android:id="@+id/fromDatetimeTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="Date and time" />
<ImageButton
android:id="@+id/setFromDatetimeImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:src="@android:drawable/ic_menu_my_calendar" />
<TextView
android:id="@+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="10dp"
android:text="To: "
android:textStyle="bold|italic" />
<TextView
android:id="@+id/toDatetimeTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="Date and time" />
<ImageButton
android:id="@+id/setToDatetimeImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:src="@android:drawable/ic_menu_my_calendar" />
</LinearLayout>
<Button
android:id="@+id/assetBookingButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Proceed with booking" />
</LinearLayout>
<LinearLayout
android:id="@+id/assetBookingsLinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="Current bookings"
android:textStyle="bold|italic" />
<ListView
android:id="@+id/assetBookingsListView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</LinearLayout>>
</ScrollView>
</FrameLayout>