左侧图像 - 这是我需要的 Fast Scroll Thumb(小)尺寸。
右图 - 这是我得到的尺寸(非常大)。
MyFragment.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"></ListView>
</RelativeLayout>
style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/ColorPrimary</item>
<item name="colorPrimaryDark">@color/ColorPrimaryDark</item>
</style>
<style name="AppTheme.Main" parent="Theme.AppCompat">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/ColorPrimary</item>
<item name="colorPrimaryDark">@color/ColorPrimaryDark</item>
<item name="android:fastScrollThumbDrawable">@drawable/ic_datejumper</item>
<item name="android:fastScrollTrackDrawable">@android:color/transparent</item>
</style>
<style name="AppTheme.Pref" parent="Theme.AppCompat">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/ColorPrimary</item>
<item name="colorPrimaryDark">@color/ColorPrimaryDark</item>
</style>
</resources>
我尝试了我在互联网和 stackoverflow 上找到的所有方法
如果您想查看,左边的图片来自 Google 相册应用
最佳答案
刚找到一个不寻常的答案
我将 png 放在 drawables-xhdpi 文件夹中,这样就成功了
关于android - 如何减小 FastScroll 拇指大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30771246/