我有这个漂亮的基本观点: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