已經佈局顯示列表視圖中的內容和列表視圖下方的按鈕列表視圖中顯示更多信息,所以首先我只顯示列表視圖中的4行當我下次點擊按鈕4行再次添加列表中,所以現在我的按鈕在屏幕下降,所以如何使整個佈局滾動能夠讓我可以去滾動我的佈局按鈕是..問題使滾動能夠設置整個佈局的滾動android
listplacehold。 XML是
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#1A77BD"
>
<ListView
android:id="@+id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawSelectorOnTop="false" />
<View
android:id="@+id/horizontolline"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:layout_below="@id/android:list"
android:background="#000000"
/>
<Button
android:text="Load More..."
android:textColor="@color/white"
android:id="@+id/keywordsearchbutton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/horizontolline"
android:drawableLeft="@drawable/load_more_off"
android:gravity="left|center_vertical"
android:background="#1A77BD"
/>
</RelativeLayout>
and for list item layout is: listitem.xml is
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView android:id="@+id/img"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
<!-- Location where barrio items will be displayed -->
<TextView
android:id="@+id/reportid"
android:layout_marginLeft="70dip"
android:text="reporet id"
android:textColor="@color/white"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
<TextView android:id="@+id/status"
android:textColor="@color/white"
android:text="status"
android:layout_marginTop="40dip"
android:layout_marginLeft="200dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:id="@+id/title"
android:text="title"
android:layout_marginLeft="150dip"
android:textColor="@color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/date"
android:text="dateeeeeee"
android:layout_marginLeft="70dip"
android:layout_marginTop="40dip"
android:textColor="@color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
項目動態loadein列表視圖時,點擊鏈接
我認爲滾動將設置上面的xml意味着「listplacehold.xml」,但如何?,當我這樣做是設置爲一半的屏幕,意味着它不顯示在整個視圖...感謝您的幫助提前。
這將不會在OP的情況下工作,因爲他使用的ListView不能在ScrollView中使用。看到你所引用的文檔,第二段的概述:http://developer.android.com/reference/android/widget/ScrollView.html – ForceMagic