Lines Matching defs:range
158 * Sets the range, offset and extent of the scroll bar. The range represents the size of a
165 * @param range The range of the scrollbar's thumb
169 * position specified by the given range, offset and extent.
176 @IntRange(from = 0) int range,
185 if (getVisibility() == View.GONE || range == 0) {
189 int thumbLength = calculateScrollThumbLength(range, extent);
190 int thumbOffset = calculateScrollThumbOffset(range, offset, thumbLength);
211 * @param range The range of the scrollbar's thumb
217 void setParametersInLayout(int range, int offset, int extent) {
219 if (getVisibility() == View.GONE || range == 0) {
223 int thumbLength = calculateScrollThumbLength(range, extent);
224 int thumbOffset = calculateScrollThumbOffset(range, offset, thumbLength);
483 * Calculates and returns how big the scroll bar thumb should be based on the given range and
486 * @param range The total amount of space the scroll bar is allowed to roam over.
487 * @param extent The amount of space that the scroll bar takes up relative to the range.
490 private int calculateScrollThumbLength(int range, int extent) {
492 return Math.round(((float) extent / range) * mScrollThumbTrackHeight);
499 * @param range The total amount of space the scroll bar is allowed to roam over.
501 * the given range.
505 private int calculateScrollThumbOffset(int range, int offset, int thumbLength) {
511 ? Math.round(((float) offset / range) * mScrollThumbTrackHeight)