我如何获得一个Android搜索栏的拇指相匹配的搜索栏的高度?

问题描述:

我需要实现自定义的拇指绘制对象?

Do I need to implement a custom thumb Drawable?

通过一些挖,我发现如何提供一个自定义绘制对象大拇指。下面是一个摘录,可以帮助别人。

With some digging, I found how to supply a custom Drawable thumb. Here's an excerpt that may help others.

  ShapeDrawable thumb = new ShapeDrawable( new RectShape() );
  thumb.getPaint().setColor( 0x00FF00 );
  thumb.setIntrinsicHeight( 80 );
  thumb.setIntrinsicWidth( 30 );
  mySeekBar.setThumb( thumb );