修改listview fastscroll图像

http://blog.csdn.net/jiangxuchen/article/details/7463105 

 

try
  {
  
   Field f = AbsListView.class.getDeclaredField("mFastScroller");
   f.setAccessible(true);
   Object o = f.get(listView);
  
   f = f.getType().getDeclaredField("mThumbDrawable");
   f.setAccessible(true);
   Drawable drawable = (Drawable) f.get(o);
  
   drawable = getResources().getDrawable(R.drawable.icon);
  
   f.set(o, drawable);

  }
  catch (Exception e)
  {
   throw new RuntimeException(e);
  }

你可能感兴趣的:(ListView)