title: Custom scrollbar thumb not being applied to ListFragment with Theme.AppCompat.NoActionBar activity
body: <p>For some reason my custom drawable will not apply as a custom fast scroll thumb when declaring it in <code>styles.xml</code>. I really don't get why it's not changing when something like this should be straight forward. How can a custom drawable be used for the fast scroll thumb when using the <code>Theme.AppCompat.NoActionBar</code> theme?</p>
  
  <p><strong>Manifest</strong></p>
  
  <pre><code>&lt;activity
      android:name=".fruit.FruitActivity"
      android:theme="@style/Theme.AppCompat.NoActionBar" /&gt;
  </code></pre>
  
  <p><strong>fragment_withfastscroll.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
  
      &lt;ListView
          android:id="@android:id/list"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:choiceMode="singleChoice"
          android:fastScrollEnabled="true"
          android:scrollbarStyle="outsideInset" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>styles.xml</strong></p>
  
  <pre><code>&lt;style name="OrangeTheme" parent="Theme.AppCompat.NoActionBar"&gt;
      &lt;item name="android:fastScrollPreviewBackgroundRight"&gt;@drawable/fastscrollpreview_orange&lt;/item&gt;
      &lt;item name="android:fastScrollOverlayPosition"&gt;atThumb&lt;/item&gt;
      &lt;item name="android:fastScrollThumbDrawable"&gt;@drawable/fastscrollthumb_orange&lt;/item&gt;
      &lt;item name="android:fastScrollTextColor"&gt;#fff&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p><strong>FruitListAdapter.java</strong></p>
  
  <pre><code>public class FruitLineListAdapter extends BaseAdapter implements SectionIndexer {
  
      private List&lt;Fruit&gt; mData;
      private LayoutInflater mInflater;
  
      private Object[] mSections;
      private int[] mSectionsIndexedByPosition;
      private int[] mPositionsIndexedBySection;
  
      public FruitListAdapter(List&lt;Fruit&gt; data, Context context) {
          mData = data;
          mData = new ArrayList(mData);
          mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          setupSections();
      }
  
      @Override
      public int getCount() {
          return mData.size();
      }
  
      @Override
      public Object getItem(int position) {
          return mData.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          return position;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
  
  
          FruitListAdapter.ViewHolder holder;
  
          if (convertView == null) {
              convertView = mInflater.inflate(R.layout.listitem_dualline, parent, false);
              holder = new FruitListAdapter.ViewHolder();
  
              holder.title = convertView.findViewById(R.id.listitemtitle_singleline);
              holder.description = convertView.findViewById(R.id.item_description);
  
              convertView.setTag(holder);
          } else {
              holder = (FruitListAdapter.ViewHolder) convertView.getTag();
          }
  
  
  
          return convertView;
      }
  
      static class ViewHolder {
          private TextView title;
          private TextView description;
      }
  
      @Override
      public int getPositionForSection(int section) {
          return mPositionsIndexedBySection[section];
      }
  
      @Override
      public int getSectionForPosition(int position) {
          return mSectionsIndexedByPosition[position];
      }
  
      @Override
      public Object[] getSections() {
          return mSections;
      }
  
      private void setupSections() {
          String initial = "\0";
          List&lt;String&gt; sections = new ArrayList&lt;&gt;();
          mSectionsIndexedByPosition = new int[mData.size()];
          mPositionsIndexedBySection = new int[mData.size()];
  
          int section = 0;
          for (int pos = 0; pos &lt; mData.size(); pos++) {
              Fruit fruit = mData.get(pos);
              if (initial.charAt(0) != fruit.getStation().charAt(0)) {
                  initial = fruit.getStation().substring(0, 1);
                  section = sections.size();
                  sections.add(initial);
                  mPositionsIndexedBySection[section] = pos;
                  mSectionsIndexedByPosition[pos] = section;
              } else {
                  mSectionsIndexedByPosition[pos] = section;
              }
          }
          mSections = sections.toArray();
          mPositionsIndexedBySection = Arrays.copyOf(mPositionsIndexedBySection, mSections.length);
      }
  }
  </code></pre>
  
  <p><strong>fragment</strong></p>
  
  <pre><code>public class FragmentFruit extends ListFragment {
  
      public FragmentFruit() {}
  
      public static FragmentFruit newInstance() {
          return new FragmentFruit();
      }
  
      @Nullable
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          View view = inflater.inflate(R.layout.fragment_withfastscroll, container, false);
          initialize();
          return view;
      }
  
      List&lt;Fruit&gt; list = new ArrayList&lt;&gt;();
      private void initialize() {
          String[] items = getActivity().getResources().getStringArray(R.array.fruit_names);
          String[] itemDescriptions = getActivity().getResources().getStringArray(R.array.fruit_descriptions);
          for (int n = 0; n &lt; items.length; n++){
              Fruit fruit = new Fruit();
              fruit.setID();
              fruit.setStation(items[n]);
              fruit.setZone(itemDescriptions[n]);
              list.add(fruit);
          }
  
          FruitListAdapter mAdapter = new FruitListAdapter(list, getActivity());
          setListAdapter(mAdapter);
      }
  
      public static void ChangeColorScrollBar(View Scroll, int Color, Context cxt){
  
          try
          {
              Field mScrollCacheField = View.class.getDeclaredField("mScrollCache");
              mScrollCacheField.setAccessible(true);
              Object mScrollCache = mScrollCacheField.get(Scroll);
              Field scrollBarField = mScrollCache.getClass().getDeclaredField("scrollBar");
              scrollBarField.setAccessible(true);
              Object scrollBar = scrollBarField.get(mScrollCache);
              Method method = scrollBar.getClass().getDeclaredMethod("setVerticalThumbDrawable", Drawable.class);
              method.setAccessible(true);
  
              Drawable[] layers = new Drawable[1];
              ShapeDrawable sd1 = new ShapeDrawable(new RectShape());
              sd1.getPaint().setColor(cxt.getResources().getColor(Color));
              sd1.setIntrinsicWidth(Math.round(cxt.getResources().getDimension(R.dimen.dp_3)));
              layers[0] = sd1;
  
              method.invoke(scrollBar, layers);
          }
          catch(Exception e)
          {
              e.printStackTrace();
          }
      }
  
  
      @Override
      public void onActivityCreated(Bundle savedInstanceState) {
          View v = getView();
  
          mTwoPane = getActivity().findViewById(R.id.detail_container) != null;
  
  
          assert v != null;
          ListView lv = v.findViewById(android.R.id.list);
          lv.mScrollCache.scrollBar.setVerticalThumbDrawable(getResources().getDrawable(R.drawable.fastscrollthumb_orange));
  
          super.onActivityCreated(savedInstanceState);
      }
  }
  </code></pre>