gpt4 book ai didi

android - 如何减小 FastScroll 拇指大小

转载 作者:行者123 更新时间:2023-11-30 02:05:17 25 4
gpt4 key购买 nike

左侧图像 - 这是我需要的 Fast Scroll Thumb(小)尺寸。
右图 - 这是我得到的尺寸(非常大)。
This is the size i want to my scroll thumb enter image description here

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com