[英]how to change color of the scrollview max stretch indicator
試試這個
android:scrollbarThumbVertical="#FF94CC"
您可以使用android:colorEdgeEffect
更改 ScrollView、RecyclerView 等的邊緣顏色。
<style name="HorizontalScrollViewStyle">
<item name="android:colorEdgeEffect">@android:color/holo_green_dark</item>
</style>
在您的HorizontalScrollView
使用此主題:
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scrollbars="none"
android:theme="@style/HorizontalScrollViewStyle">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
......
</LinearLayout>
</HorizontalScrollView>
注意 - android:colorEdgeEffect
僅適用於 API 21 及更高版本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.