我有這個漂亮的基本觀點:Android的 - 不能得到滾動視圖滾動列表正確
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/question_label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Your question: "
/>
<TextView
android:id="@+id/question"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=""
/>
<EditText
android:id="@+id/question_text"
android:layout_height="wrap_content"
android:hint="@string/question_comment_hint"
android:inputType="textMultiLine"
android:lines="4"
android:layout_width="fill_parent">
</EditText>
<Button
android:id="@+id/submit"
android:layout_height="wrap_content"
android:text="@string/submit"
android:onClick="sendFeedback"
android:layout_width="fill_parent">
</Button>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/please_wait"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Please wait while the discussion loads..."
/>
<ListView
android:id="@android:id/list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@+id/label"
android:textSize="20px" >
</ListView>
</LinearLayout>
</ScrollView>
</LinearLayout>
我希望用它做是爲了讓用戶通過整個滾動列表註釋。到目前爲止,當屏幕上出現更多評論時,屏幕不會向下滾動。
任何想法我應該改變,以啓用滾動的評論?
謝謝!
不確定這是問題所在,但您絕對不應該在Android的scrollview中擁有listview。 – coder 2012-04-12 20:51:09
@coder怎麼回事?你是對的。無論我嘗試什麼,這都會給我帶來麻煩。你將如何組織這種頁面? – GeekedOut 2012-04-12 20:54:12
什麼是listview的?所有的評論? – coder 2012-04-12 20:56:19