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

두 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

완벽한 답변 감사합니다. –