title: Is there any way to enable scrollbars for RecyclerView in code?
body: <p>As we saw, RecyclerView is more effective than ListView, so I prefer to use it in my project. But recently I have a trouble when put it in my custom ViewGroup. RecyclerView is easy to set scrollbars in xml like this:</p>
  
  <pre><code>&lt;android.support.v7.widget.RecyclerView
      android:id="@+id/recycler_view"
      android:scrollbars="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  </code></pre>
  
  <p>But I really can't find any method to set the scrollbars in code for RecyclerView, what I have tried is:</p>
  
  <pre><code>mRecyclerView.setVerticalScrollBarEnabled(true);
  </code></pre>
  
  <p>and then I saw <a href="https://developer.android.com/intl/zh-cn/reference/android/support/v7/widget/RecyclerView.LayoutManager.html#computeHorizontalScrollExtent(android.support.v7.widget.RecyclerView.State)">this</a> in Android's document.</p>
  
  <p>So I tried to make my own LayoutManager and override the functions which I thought I need. But finally I failed. So can anyone tell me how should I make my own LayoutManager or just show me an other solution. Thank you!</p>