Lines Matching defs:thumb

41  * AbsSeekBar extends the capabilities of ProgressBar by adding a draggable thumb.
103 final Drawable thumb = a.getDrawable(R.styleable.SeekBar_thumb);
104 setThumb(thumb);
133 // Guess thumb offset if thumb != null, but allow layout to override.
156 * Sets the thumb that will be drawn at the end of the progress meter within the SeekBar.
158 * If the thumb is a valid drawable (i.e. not null), half its width will be
159 * used as the new thumb offset (@see #setThumbOffset(int)).
161 * @param thumb Drawable representing the thumb
163 public void setThumb(Drawable thumb) {
168 if (mThumb != null && thumb != mThumb) {
175 if (thumb != null) {
176 thumb.setCallback(this);
178 thumb.setLayoutDirection(getLayoutDirection());
181 // Assuming the thumb drawable is symmetric, set the thumb offset
182 // such that the thumb will hang halfway off either edge of the
184 mThumbOffset = thumb.getIntrinsicWidth() / 2;
188 (thumb.getIntrinsicWidth() != mThumb.getIntrinsicWidth()
189 || thumb.getIntrinsicHeight() != mThumb.getIntrinsicHeight())) {
194 mThumb = thumb;
201 if (thumb != null && thumb.isStateful()) {
205 thumb.setState(state);
211 * Return the drawable used to represent the scroll thumb - the component that
214 * @return The current thumb drawable
221 * Applies a tint to the thumb drawable. Does not modify the current tint
242 * Returns the tint applied to the thumb drawable, if specified.
244 * @return the tint applied to the thumb drawable
255 * {@link #setThumbTintList(ColorStateList)}} to the thumb drawable. The
273 * Returns the blending mode used to apply the tint to the thumb drawable,
276 * @return the blending mode used to apply the tint to the thumb drawable
313 * Sets the thumb offset that allows the thumb to extend out of the range of
324 * Specifies whether the track should be split by the thumb. When true,
325 * the thumb's optical bounds will be clipped out of the track drawable,
326 * then the thumb will be drawn into the resulting gap.
328 * @param splitTrack Whether the track should be split by the thumb
336 * Returns whether the track should be split by the thumb.
344 * possible thumb position.
533 final Drawable thumb = mThumb;
534 if (thumb != null && thumb.isStateful()
535 && thumb.setState(getDrawableState())) {
536 invalidateDrawable(thumb);
560 final Drawable thumb = mThumb;
561 if (thumb != null) {
562 setThumbPos(getWidth(), thumb, scale, Integer.MIN_VALUE);
582 final Drawable thumb = mThumb;
587 final int thumbHeight = thumb == null ? 0 : thumb.getIntrinsicHeight();
607 if (thumb != null) {
608 setThumbPos(w, thumb, getScale(), thumbOffset);
620 * Updates the thumb drawable bounds.
623 * @param thumb Drawable used for the thumb
628 private void setThumbPos(int w, Drawable thumb, float scale, int offset) {
630 final int thumbWidth = thumb.getIntrinsicWidth();
631 final int thumbHeight = thumb.getIntrinsicHeight();
634 // The extra space for the thumb to move on the track
641 final Rect oldBounds = thumb.getBounds();
661 thumb.setBounds(left, top, right, bottom);
730 * Draw the thumb.
735 // Translate the padding. For the x, we need to allow the thumb to
800 // ProgressBar doesn't know to repaint the thumb drawable
1006 final Drawable thumb = mThumb;
1007 if (thumb != null) {
1008 setThumbPos(getWidth(), thumb, getScale(), Integer.MIN_VALUE);