滚动视图中的滚动条只有在我开始滚动时才可见。 我怎么才能一直表现出来呢?


当前回答

因为以上两个都不适合我,这里是什么做的:android:scrollbarDefaultDelayBeforeFade="500000"

其他回答

样式你的滚动条可见性,颜色和厚度像这样:

<ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/recycler_bg"

        <!--Show Scroll Bar-->
        android:fadeScrollbars="false"
        android:scrollbarAlwaysDrawVerticalTrack="true"
        android:scrollbarFadeDuration="50000"

        <!--Scroll Bar thickness-->
        android:scrollbarSize="4dp"

        <!--Scroll Bar Color-->
        android:scrollbarThumbVertical="@color/colorSecondaryText"/>

希望能帮你节省时间。

因为以上两个都不适合我,这里是什么做的:android:scrollbarDefaultDelayBeforeFade="500000"

设置android:scrollbarFadeDuration="0"就可以了。

设置这个就可以了。更改@drwable为自己的风格。

android:scrollbars="vertical"
            android:scrollbarAlwaysDrawVerticalTrack="true"
            android:fadeScrollbars="false"
            android:scrollbarThumbVertical="@drawable/scroll"`

这两条加起来对我很有用:

android:scrollbarFadeDuration="0"
android:scrollbarAlwaysDrawVerticalTrack="true"