【发布时间】:2011-05-21 06:38:15
【问题描述】:
我的 Activity 有一个自定义标题栏和一个 ListView。 ListView 使用 SimpleAdapter 显示数据数组,没什么特别的。我注意到,当我在不离开屏幕的情况下继续上下滑动手指时,滚动通常会停止并且滚动条会消失。这在 Gmail 收件箱活动中永远不会发生。在 NPR 新闻应用程序中,菜单活动遇到同样的问题。我错过了什么?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/title_bar"
android:singleLine="true"
android:textAppearance="@android:style/TextAppearance.WindowTitle">
<Button
android:id="@+id/accounts_filter"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
style="@android:style/Widget.Button.Small"
android:maxWidth="200sp"
android:singleLine="true"
android:ellipsize="marquee"
android:onClick="openFilter"/>
</RelativeLayout>
<ListView android:id="@+id/accounts_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
【问题讨论】:
-
似乎是一个 Android 错误。升级到 2.3.4 后不再重现。
标签: android listview non-scrolling