Rak*_*shi 48 android android-listview fastscroll
我列出了按月和年分开的活动清单(2010年6月,2010年7月等)
我想启用快速滚动,因为列表非常长.
如何ListViews
在Android中启用快速滚动?
Mau*_*ice 98
在ListActivity的onCreate方法中使用setFastScrollEnabled:
getListView().setFastScrollEnabled(true);
Run Code Online (Sandbox Code Playgroud)
小智 66
在你的xml中使用android:fastScrollEnabled:
<ListView
android:id="@+id/listview_files"
...
android:fastScrollEnabled="true" >
</ListView>
Run Code Online (Sandbox Code Playgroud)
请尝试以下方法
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="listviewfastscrollstyle" parent="android:Theme">
<item name="android:fastScrollTrackDrawable">@drawable/listselector</item>
<item name="android:fastScrollThumbDrawable">@drawable/listselector</item>
</style>
</resources>
Run Code Online (Sandbox Code Playgroud)
在你的Manifest中设置如下样式:
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/CustomTheme">
Run Code Online (Sandbox Code Playgroud)
这是列表视图
<ExpandableListView
android:id="@android:id/list1"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:drawSelectorOnTop="false"
android:fastScrollAlwaysVisible="true"
android:fastScrollEnabled="true"
/>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
43639 次 |
最近记录: |