Android: change color of spinner's popup scrol

2019-07-27 04:19发布

How can I change the color of the spinner's popup scrollbar?

For some reason the color of the scrollbar is currently white on a white background, it is not visible.

2条回答
smile是对你的礼貌
2楼-- · 2019-07-27 04:37
add android:scrollbarThumbVertical="@drawable/yourdawable //in your spinner 

yourdrawable.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <gradient android:startColor="your color" android:endColor="your color"
        android:angle="45"/>

    <corners android:radius="6dp" />

</shape>
查看更多
太酷不给撩
3楼-- · 2019-07-27 04:41

I found this solution for changing the scrollbar color globally:

How can I change the color of the scrollbar in Android?

查看更多
登录 后发表回答