3
A
回答
8
可以使用
listView.smoothScrollToPosition(specificPosition);
7
据supossed您正在使用一个ListView控件,那么你可以调用列表视图的setSelection(position)。
+1
我更喜欢这个解决方案,因为'smoothScroll'只是Android 2.2及更高版本,如果列表很大,则可能需要很长时间。 – 2011-08-03 12:45:35
-1
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="?whiteBackground">
</LinearLayout>
<TextView android:id="@+id/textView1" android:layout_width="fill_parent" style="?textTitle" android:layout_height="wrap_content" android:text="Contents"></TextView>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="the following is content..."
style="?textSubheader"/>
<!-- You cannot have a ListView inside of a ScrollView. This LinearLayout acts like one. -->
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
- >
<ListView android:id="@+id/lv" android:textColor="#444444"
android:layout_height="270dip"
android:textStyle="bold"
android:cacheColorHint="#00000000" android:dividerHeight="2px"
android:layout_marginTop="5px" android:layout_width="fill_parent"
android:textSize="5px" android:layout_gravity="center">
</ListView>
<TextView android:id="@+id/any_old_widgetqss"
android:layout_width="fill_parent" style="?textTitle"
android:layout_height="40px" android:text="MCMS" android:background="@drawable/colorr"></TextView>
</LinearLayout>
</LinearLayout>
</ScrollView>
相关问题
- 1. ListView和WebView滚动
- 2. Android ListView和滚动问题
- 3. ListView和TextView滚动问题
- 4. ListView滚动
- 5. ListView不滚动
- 6. Listview慢速滚动
- 7. Android 2D滚动Listview?
- 8. 的ListView滚动型
- 9. 加速listview滚动
- 10. 控制Listview滚动?
- 11. ListView无法滚动
- 12. listView滚动记忆
- 13. ListView滚动错误
- 14. Android - ListView图像滚动时滚动
- 15. ListView或ScrollPane滚动条不滚动
- 16. 向上滚动时向上滚动listview
- 17. ListView滚动的同时滚动视图
- 18. 连续自动滚动ListView
- 19. 如何禁用GridView中的ListView滚动条和滚动条
- 20. 可滚动ListView和一个TextView
- 21. 添加视图到ListView和滚动型
- 22. ListView和LineraLayout下一个滚动条
- 23. ImageView + ListView + GridView - 滚动仅适用于ListView
- 24. 你如何以编程方式禁用ListView和滚动ListView?
- 25. ListView标题不滚动
- 26. 临时绕过ListView滚动
- 27. ListView滚动线条模糊
- 28. WPF ListView非整数滚动
- 29. Listview向下滚动问题
- 30. Android ListView setSelection不滚动
搜索了 “编程滚动” 等问题,也有类似的问题负载无论是在SO还是在Google上。 – 2010-04-13 10:59:29