gpt4 book ai didi

android - 如何更改滚动条的宽度/厚度?

转载 作者:IT老高 更新时间:2023-10-28 21:54:13 28 4
gpt4 key购买 nike

目前这是我的 scrollbar.xml 文件:

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

<gradient
android:angle="45"
android:centerColor="@color/blue"
android:endColor="@color/blue"
android:startColor="@color/blue" />

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

</shape>

这是我的 ScrollView:

<ScrollView
android:id="@+id/scrollView1"
android:scrollbarThumbVertical="@drawable/scrollbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/btnBack" >

这是它给我的滚动条。挺好的,就是太厚太明显了。在这个屏幕截图中,它可能看起来并不厚,但确实如此。

enter image description here

我可以设置 ScrollView 属性来调整滚动条的宽度/厚度吗?或者我可以在渐变中放置一个属性吗?

最佳答案

将以下属性添加到您的布局中

android:scrollbarSize="50dip"

关于android - 如何更改滚动条的宽度/厚度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20782499/

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