Searched refs:constrain (Results 1 - 25 of 41) sorted by relevance

12

/frameworks/support/core-ui/java/android/support/v4/widget/
H A DAutoScrollHelper.java60 * <li>Maximum size used to constrain relative size, see
74 * <li>Minimum velocity used to constrain relative velocity, see
78 * <li>Maximum velocity used to constrain relative velocity, see
361 * be used to constrain the calculated relative edge size.
382 * the maximum edge will be used to constrain the calculated relative edge
555 return constrain(value * targetVelocity, minimumVelocity, maximumVelocity);
557 return -constrain(-value * targetVelocity, minimumVelocity, maximumVelocity);
606 final float edgeSize = constrain(relativeValue * size, NO_MIN, maxValue);
619 return constrain(interpolated, -1, 1);
651 static int constrain(in method in class:AutoScrollHelper
661 static float constrain(float value, float min, float max) { method in class:AutoScrollHelper
[all...]
/frameworks/base/core/java/com/android/internal/widget/
H A DAutoScrollHelper.java60 * <li>Maximum size used to constrain relative size, see
74 * <li>Minimum velocity used to constrain relative velocity, see
78 * <li>Maximum velocity used to constrain relative velocity, see
361 * be used to constrain the calculated relative edge size.
382 * the maximum edge will be used to constrain the calculated relative edge
555 return constrain(value * targetVelocity, minimumVelocity, maximumVelocity);
557 return -constrain(-value * targetVelocity, minimumVelocity, maximumVelocity);
606 final float edgeSize = constrain(relativeValue * size, NO_MIN, maxValue);
619 return constrain(interpolated, -1, 1);
651 private static int constrain(in method in class:AutoScrollHelper
661 private static float constrain(float value, float min, float max) { method in class:AutoScrollHelper
[all...]
/frameworks/base/core/java/android/util/
H A DMathUtils.java35 public static int constrain(int amount, int low, int high) { method in class:MathUtils
39 public static long constrain(long amount, long low, long high) { method in class:MathUtils
43 public static float constrain(float amount, float low, float high) { method in class:MathUtils
/frameworks/base/core/java/com/android/internal/graphics/
H A DColorUtils.java248 outHsl[0] = constrain(h, 0f, 360f);
249 outHsl[1] = constrain(s, 0f, 1f);
250 outHsl[2] = constrain(l, 0f, 1f);
328 r = constrain(r, 0, 255);
329 g = constrain(g, 0, 255);
330 b = constrain(b, 0, 255);
529 constrain((int) Math.round(r * 255), 0, 255),
530 constrain((int) Math.round(g * 255), 0, 255),
531 constrain((int) Math.round(b * 255), 0, 255));
560 private static float constrain(floa method in class:ColorUtils
564 private static int constrain(int amount, int low, int high) { method in class:ColorUtils
[all...]
/frameworks/support/core-utils/java/android/support/v4/graphics/
H A DColorUtils.java204 outHsl[0] = constrain(h, 0f, 360f);
205 outHsl[1] = constrain(s, 0f, 1f);
206 outHsl[2] = constrain(l, 0f, 1f);
284 r = constrain(r, 0, 255);
285 g = constrain(g, 0, 255);
286 b = constrain(b, 0, 255);
485 constrain((int) Math.round(r * 255), 0, 255),
486 constrain((int) Math.round(g * 255), 0, 255),
487 constrain((int) Math.round(b * 255), 0, 255));
516 private static float constrain(floa method in class:ColorUtils
520 private static int constrain(int amount, int low, int high) { method in class:ColorUtils
[all...]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/
H A DDisplayDensityUtils.java111 final int numLarger = (int) MathUtils.constrain((maxScale - 1) / MIN_SCALE_INTERVAL,
113 final int numSmaller = (int) MathUtils.constrain((1 - minScale) / MIN_SCALE_INTERVAL,
/frameworks/base/core/java/com/android/internal/util/
H A DNotificationColorUtil.java876 constrain((int) Math.round(r * 255), 0, 255),
877 constrain((int) Math.round(g * 255), 0, 255),
878 constrain((int) Math.round(b * 255), 0, 255));
898 private static int constrain(int amount, int low, int high) { method in class:NotificationColorUtil.ColorUtilsFromCompat
902 private static float constrain(float amount, float low, float high) { method in class:NotificationColorUtil.ColorUtilsFromCompat
981 r = constrain(r, 0, 255);
982 g = constrain(g, 0, 255);
983 b = constrain(b, 0, 255);
1050 outHsl[0] = constrain(h, 0f, 360f);
1051 outHsl[1] = constrain(
[all...]
H A DProgressReporter.java147 + MathUtils.constrain((n * mSegmentRange[1]) / m, 0, mSegmentRange[1]);
/frameworks/base/core/java/android/widget/
H A DTextInputTimePickerView.java205 MathUtils.constrain(hour, minHour, maxHour)));
220 mListener.onValueChanged(MINUTES, MathUtils.constrain(minutes, 0, 59));
H A DDayPickerView.java163 final long setDateMillis = MathUtils.constrain(
390 return MathUtils.constrain(diffMonth, 0, diffMonthMax);
H A DTimePicker.java174 mDelegate.setHour(MathUtils.constrain(hour, 0, 23));
194 mDelegate.setMinute(MathUtils.constrain(minute, 0, 59));
H A DSimpleMonthView.java536 row = MathUtils.constrain(row, 0, maxRows);
551 MathUtils.constrain(centerX / mCellWidth, 0, DAYS_IN_WEEK - 1);
822 mEnabledDayStart = MathUtils.constrain(enabledDayStart, 1, mDaysInMonth);
823 mEnabledDayEnd = MathUtils.constrain(enabledDayEnd, mEnabledDayStart, mDaysInMonth);
H A DFastScroller.java997 final int exactSection = MathUtils.constrain(
1065 targetIndex = MathUtils.constrain(targetIndex, 0, count - 1);
1078 final int index = MathUtils.constrain((int) (position * count), 0, count - 1);
1222 final float previewMiddle = MathUtils.constrain(previewPos, minP, maxP);
1237 return MathUtils.constrain((y - mThumbOffset) / mThumbRange, 0f, 1f);
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
H A DMagnificationController.java436 scale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE);
610 final float normScale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE);
631 final float offsetX = MathUtils.constrain(nonNormOffsetX, getMinOffsetXLocked(), 0);
636 final float offsetY = MathUtils.constrain(nonNormOffsetY, getMinOffsetYLocked(), 0);
H A DMagnificationGestureHandler.java814 final float scale = MathUtils.constrain(targetScale, MIN_SCALE, MAX_SCALE);
831 final float scale = MathUtils.constrain(targetScale, MIN_SCALE, MAX_SCALE);
/frameworks/support/content/tests/java/android/support/content/
H A DTestContentProvider.java155 int numItems = constrain(recordsetSize - offset, 0, limit);
342 private static int constrain(int amount, int low, int high) { method in class:TestContentProvider
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
H A DTouchAnimator.java56 float t = MathUtils.constrain((fraction - mStartDelay) / mSpan, 0, 1);
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
H A DDozeParameters.java132 return MathUtils.constrain(value, 0, MAX_DURATION);
/frameworks/base/services/core/java/com/android/server/
H A DRescueParty.java143 final int level = MathUtils.constrain(
/frameworks/base/core/java/android/content/res/
H A DColorStateList.java506 final int alpha = MathUtils.constrain((int) (baseAlpha * alphaMod + 0.5f), 0, 255);
/frameworks/base/services/core/java/com/android/server/net/
H A DNetworkStatsRecorder.java137 mPersistThresholdBytes = MathUtils.constrain(
/frameworks/base/core/java/android/net/
H A DNetworkStatsHistory.java253 return MathUtils.constrain(index, 0, bucketCount - 1);
267 return MathUtils.constrain(index, 0, bucketCount - 1);
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DNetworkControllerImpl.java825 int num = MathUtils.constrain(Integer.parseInt(sims), 1, 8);
847 slot = MathUtils.constrain(slot, 0, 8);
/frameworks/base/services/core/java/com/android/server/display/
H A DDisplayPowerController.java978 return MathUtils.constrain(
1409 return MathUtils.constrain(value, PowerManager.BRIGHTNESS_OFF, PowerManager.BRIGHTNESS_ON);
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
H A DSwitchCompat.java951 final float newPos = constrain(mThumbPosition + dPos, 0, 1);
1411 private static float constrain(float amount, float low, float high) { method in class:SwitchCompat

Completed in 690 milliseconds

12