我一直想在我的佈局中放置3個MvxBindableListView小部件,但沒有成功。 有沒有辦法做到這一點,以便每個MvxBindableListView完全顯示沒有內滾動和我的「頁面」可滾動。 這是佈局:多個MvxBindableListView在一個佈局中?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res/MyCurrentProject.Client.UI"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
local:MvxBind="{}" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceLarge"
local:MvxBind="{}" />
<Mvx.MvxBindableListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:clickable="false"
local:MvxBind="{}" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceLarge"
local:MvxBind="{}" />
<Mvx.MvxBindableListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:clickable="false"
local:MvxBind="{}" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceLarge"
local:MvxBind="{}" />
<Mvx.MvxBindableListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:clickable="false"
local:MvxBind="{}" />
</LinearLayout>
</LinearLayout>
在此處爲空,但完全正常工作。該列表有不同數量的元素,所以固定高度是不可能的...
在此先感謝!
是不是有辦法將MvxBindableListViews的高度設置爲列表的完整大小,以便它們不滾動,我可以使用ScollView? – Ivozor
檢查出在Android文檔wrap_content – Stuart
我試過了,它將列表的高度設置爲1的列表項的高度...並與列表仍然可滾動... :( – Ivozor