2
<android.support.v7.widget.RecyclerView 
     android:id="@+id/recyclerView" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:background="#ddd" 
     android:fadeScrollbars="true" 
     android:scrollbarSize="12dp" 
     android:orientation="vertical" 
     android:scrollbars="vertical"/> 

私は5.1.1でコードをテストしています。 android:scrollbarSizeを変更しても効果はありません。私はそれを増減しようとしましたが、変化はありませんでした。RecyclerViewのスクロールバーの幅を変更

幅を変更するにはどうすればよいですか?プログラムでonDrawHorizontalScrollBaronDrawVerticalScrollBarコールバックを通じてスクロールバーを操作するandroid:scrollbarThumbVertical="@drawable/yoursdrawablefile

2)を介して、スクロールバーの

1)変更の描画可能:

答えて

0

次の2つのoportunitiesのいずれかを持っています。

詳細については、first two answers of this questionをご覧ください。

+1

xmlの属性を変更することができないのはなぜですか?それは既知のバグですか? – q126y

6

さて、私はあなたの方法を教えて、あなたはそれを試すことができ、その後、あなたは答えを知っている: 次のコードを追加します。

android:scrollbarThumbVertical="@color/colorAccent" 

このようなブロック全体:

<android.support.v7.widget.RecyclerView 
    android:id="@+id/RV_hot_latest" 
    android:layout_width="wrap_content" 
    android:layout_height="match_parent" 
    android:scrollbars="vertical" 
    android:scrollbarThumbVertical="@color/colorAccent" 
    android:scrollbarSize="18dp" 
    android:scrollbarStyle="outsideInset"/> 

を今、あなたはandroid:scrollbarSizeが効果があることがわかります。 幸運を祈る!

+0

完璧な回答ありがとう –

関連する問題