Lines Matching refs:thumb

73         Drawable thumb = a.getDrawable(com.android.internal.R.styleable.SeekBar_thumb);
74 setThumb(thumb); // will guess mThumbOffset if thumb != null...
90 * Sets the thumb that will be drawn at the end of the progress meter within the SeekBar.
92 * If the thumb is a valid drawable (i.e. not null), half its width will be
93 * used as the new thumb offset (@see #setThumbOffset(int)).
95 * @param thumb Drawable representing the thumb
97 public void setThumb(Drawable thumb) {
102 if (mThumb != null && thumb != mThumb) {
108 if (thumb != null) {
109 thumb.setCallback(this);
111 thumb.setLayoutDirection(getLayoutDirection());
114 // Assuming the thumb drawable is symmetric, set the thumb offset
115 // such that the thumb will hang halfway off either edge of the
117 mThumbOffset = thumb.getIntrinsicWidth() / 2;
121 (thumb.getIntrinsicWidth() != mThumb.getIntrinsicWidth()
122 || thumb.getIntrinsicHeight() != mThumb.getIntrinsicHeight())) {
126 mThumb = thumb;
130 if (thumb != null && thumb.isStateful()) {
134 thumb.setState(state);
140 * Return the drawable used to represent the scroll thumb - the component that
143 * @return The current thumb drawable
157 * Sets the thumb offset that allows the thumb to extend out of the range of
229 Drawable thumb = mThumb;
230 if (thumb != null) {
231 setThumbPos(getWidth(), thumb, scale, Integer.MIN_VALUE);
250 Drawable thumb = mThumb;
251 int thumbHeight = thumb == null ? 0 : thumb.getIntrinsicHeight();
260 if (thumb != null) {
261 setThumbPos(w, thumb, scale, 0);
277 if (thumb != null) {
278 setThumbPos(w, thumb, scale, gap);
286 private void setThumbPos(int w, Drawable thumb, float scale, int gap) {
288 int thumbWidth = thumb.getIntrinsicWidth();
289 int thumbHeight = thumb.getIntrinsicHeight();
292 // The extra space for the thumb to move on the track
299 Rect oldBounds = thumb.getBounds();
309 thumb.setBounds(left, topBound, left + thumbWidth, bottomBound);
329 // Translate the padding. For the x, we need to allow the thumb to
406 // ProgressBar doesn't know to repaint the thumb drawable
567 Drawable thumb = mThumb;
568 if (thumb != null) {
569 setThumbPos(getWidth(), thumb, scale, Integer.MIN_VALUE);