Lines Matching refs:thumb

72         Drawable thumb = a.getDrawable(com.android.internal.R.styleable.SeekBar_thumb);
73 setThumb(thumb); // will guess mThumbOffset if thumb != null...
89 * Sets the thumb that will be drawn at the end of the progress meter within the SeekBar.
91 * If the thumb is a valid drawable (i.e. not null), half its width will be
92 * used as the new thumb offset (@see #setThumbOffset(int)).
94 * @param thumb Drawable representing the thumb
96 public void setThumb(Drawable thumb) {
101 if (mThumb != null && thumb != mThumb) {
107 if (thumb != null) {
108 thumb.setCallback(this);
110 // Assuming the thumb drawable is symmetric, set the thumb offset
111 // such that the thumb will hang halfway off either edge of the
114 mThumbOffset = thumb.getIntrinsicHeight() / 2;
116 mThumbOffset = thumb.getIntrinsicWidth() / 2;
121 (thumb.getIntrinsicWidth() != mThumb.getIntrinsicWidth()
122 || thumb.getIntrinsicHeight() != mThumb.getIntrinsicHeight())) {
126 mThumb = thumb;
130 if (thumb.isStateful()) {
134 thumb.setState(state);
147 * Sets the thumb offset that allows the thumb to extend out of the range of
219 Drawable thumb = mThumb;
220 if (thumb != null) {
221 setThumbPos(getWidth(), getHeight(), thumb, scale, Integer.MIN_VALUE);
239 Drawable thumb = mThumb;
241 int thumbWidth = thumb == null ? 0 : thumb.getIntrinsicWidth();
250 if (thumb != null) {
251 setThumbPos(w, h, thumb, scale, 0);
267 if (thumb != null) {
268 setThumbPos(w, h, thumb, scale, gap);
272 int thumbHeight = thumb == null ? 0 : thumb.getIntrinsicHeight();
281 if (thumb != null) {
282 setThumbPos(w, h, thumb, scale, 0);
298 if (thumb != null) {
299 setThumbPos(w, h, thumb, scale, gap);
308 private void setThumbPos(int w, int h, Drawable thumb, float scale, int gap) {
310 int thumbWidth = thumb.getIntrinsicWidth();
311 int thumbHeight = thumb.getIntrinsicHeight();
318 // The extra space for the thumb to move on the track
326 Rect oldBounds = thumb.getBounds();
335 thumb.setBounds(leftBound, thumbPos, rightBound, thumbPos + thumbHeight);
340 Rect oldBounds = thumb.getBounds();
349 thumb.setBounds(thumbPos, topBound, thumbPos + thumbWidth, bottomBound);
358 // Translate the padding. For the x/y, we need to allow the thumb to
450 // ProgressBar doesn't know to repaint the thumb drawable