Android 滚动条距离右侧距离设置
可以通过在布局文件中设置 'android:scrollbarStyle' 和 'android:scrollbarSize' 属性来调整滚动条距离右侧的距离。
例如,将滚动条设置为右侧距离为 10dp:
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarStyle="outsideOverlay"
android:scrollbarSize="10dp">
<!-- Your content here -->
</ScrollView>
其中,'android:scrollbarStyle' 属性设置为 'outsideOverlay' 表示滚动条在内容之外显示,而不是覆盖内容。'android:scrollbarSize' 属性设置为 '10dp' 表示滚动条的宽度为 10dp。可以根据需要调整这些值来满足自己的需求。
原文地址: https://www.cveoy.top/t/topic/oPH5 著作权归作者所有。请勿转载和采集!