Searched refs:distance (Results 26 - 50 of 96) sorted by relevance

1234

/frameworks/support/v7/recyclerview/tests/src/android/support/v7/util/
H A DTouchUtils.java228 int distance = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
229 drag(inst, fromX, toX, fromY, toY, calculateStepsForDistance(distance));
231 return distance;
293 private static int calculateStepsForDistance(int distance) { argument
294 return 1 + Math.abs(distance) / 10;
/frameworks/base/core/tests/coretests/src/android/widget/gridview/touch/
H A DGridTouchVerticalSpacingStackFromBottomTest.java109 int distance = TouchUtils.dragViewBy(this, firstChild,
114 + (distance - mViewConfig.getScaledTouchSlop() - 1), firstChild.getTop());
H A DGridTouchVerticalSpacingTest.java94 int distance = TouchUtils.dragViewToY(this, lastChild, Gravity.TOP | Gravity.LEFT,
98 lastTop - (distance - ViewConfiguration.getTouchSlop() - 1), lastChild.getTop());
/frameworks/base/core/tests/coretests/src/android/widget/listview/touch/
H A DListTouchBottomGravityManyTest.java147 int distance = TouchUtils.dragViewBy(this, firstChild,
152 + (distance - ViewConfiguration.getTouchSlop() - 1), firstChild.getTop());
H A DListTouchManyTest.java186 int distance = TouchUtils.dragViewToY(this, lastChild,
190 lastTop - (distance - ViewConfiguration.getTouchSlop() - 1), lastChild.getTop());
/frameworks/base/tools/aapt2/java/
H A DClassDefinition.h133 if (std::distance(begin, current) % kAttribsPerLine == 0) {
138 if (std::distance(current, end) > 1) {
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/
H A DLocationCluster.java115 public void moveAwayCluster(LocationCluster cluster, float distance) { argument
129 double radian = distance / EARTH_RADIUS;
/frameworks/base/core/java/com/android/internal/policy/
H A DDividerSnapAlgorithm.java232 float distance = Math.abs(position - target.position);
234 distance /= target.distanceMultiplier;
236 if (distance < minDistance) {
238 minDistance = distance;
390 * Multiplier used to calculate distance to snap position. The lower this value, the harder
/frameworks/native/opengl/tests/gl2_jni/src/com/android/gl2jni/
H A DGL2JNIView.java155 int distance = Math.abs(r - mRedSize)
159 if (distance < closestDistance) {
160 closestDistance = distance;
/frameworks/native/opengl/tests/gl_perfapp/src/com/android/glperf/
H A DGLPerfView.java155 int distance = Math.abs(r - mRedSize)
159 if (distance < closestDistance) {
160 closestDistance = distance;
/frameworks/native/opengl/tests/gldual/src/com/android/gldual/
H A DGLDualGL2View.java158 int distance = Math.abs(r - mRedSize)
162 if (distance < closestDistance) {
163 closestDistance = distance;
/frameworks/base/test-runner/src/android/test/
H A DTouchUtils.java535 * @return distance in pixels covered by the drag
557 * @return distance in pixels covered by the drag
573 int distance = (int) Math.hypot(deltaX, deltaY);
575 drag(test, fromX, fromX + deltaX, fromY, fromY + deltaY, distance);
577 return distance;
590 * @return distance in pixels covered by the drag
612 * @return distance in pixels covered by the drag
626 int distance = (int)Math.hypot(deltaX, deltaY);
627 drag(test, fromX, toX, fromY, toY, distance);
629 return distance;
[all...]
/frameworks/base/core/java/android/view/
H A DRenderNode.java648 * Sets the camera distance for the display list. Refer to
652 * @param distance The distance in Z of the camera of the display list
657 public boolean setCameraDistance(float distance) { argument
658 return nSetCameraDistance(mNativeRenderNode, distance);
662 * Returns the distance in Z of the camera of the display list.
834 private static native boolean nSetCameraDistance(long renderNode, float distance); argument
H A DGestureDetector.java79 * current move {@link MotionEvent}. The distance in x and y is also supplied for
84 * @param distanceX The distance along the X axis that has been scrolled since the last
85 * call to onScroll. This is NOT the distance between {@code e1}
87 * @param distanceY The distance along the Y axis that has been scrolled since the last
88 * call to onScroll. This is NOT the distance between {@code e1}
605 int distance = (deltaX * deltaX) + (deltaY * deltaY);
606 if (distance > mTouchSlopSquare) {
615 if (distance > mDoubleTapTouchSlopSquare) {
641 // A fling must travel the minimum tap distance
/frameworks/base/libs/hwui/
H A DGradientCache.cpp247 float distance = positions[1] - startPos; local
259 distance = positions[currentPos] - startPos;
262 float amount = (pos - startPos) / distance;
H A DRenderProperties.h396 bool setCameraDistance(float distance) { argument
397 if (distance != getCameraDistance()) {
399 mComputedFields.mTransformCamera.setCameraLocation(0, 0, distance);
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
H A DPathMeasure_Delegate.java80 /*package*/ static boolean native_getPosTan(long native_instance, float distance, float pos[], argument
88 /*package*/ static boolean native_getMatrix(long native_instance, float distance, long argument
H A DRadialGradient_Delegate.java171 // compute distance from each point to the center, and figure out the distance from
190 float distance = (float) Math.hypot(_x, _y);
192 data[index++] = getGradientColor(distance / mRadius);
H A DPath_Delegate.java499 totalLength += currentPoint.distance(previousPoint);
511 float distance = previousPoint != null ? (float) previousPoint.distance(point) : .0f;
512 result[i * 3] = distance / totalLength;
516 totalLength += distance;
/frameworks/rs/java/tests/HealingBrush/src/rs/example/android/com/healingbrush/
H A Dfind_region.rs148 sum += distance(orig, candidate);
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/
H A DLinearSmoothScroller.java73 // Trigger a scroll to a further distance than TARGET_SEEK_SCROLL_DISTANCE_PX so that if target
109 final int distance = (int) Math.sqrt(dx * dx + dy * dy);
110 final int time = calculateTimeForDeceleration(distance);
165 * @return Time for DecelerateInterpolator to smoothly traverse the distance when transitioning
178 * Calculates the time it should take to scroll the given distance (in pixels)
243 // To avoid UI hiccups, trigger a smooth scroll to a distance little further than the
244 // interim target. Since we track the distance travelled in onSeekTargetStep callback, it
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/
H A DCachedPathIteratorFactory.java100 mSegmentsLength[i] = (float) Point2D.distance(lastX, lastY,
116 mSegmentsLength[i] = (float) Point2D.distance(lastX, lastY, mCoordinates[i][0],
231 totalLength += Point2D.distance(previousPoint[0], previousPoint[1], segment[0],
/frameworks/support/v4/java/android/support/v4/view/
H A DGestureDetectorCompat.java334 int distance = (deltaX * deltaX) + (deltaY * deltaY);
335 if (distance > mTouchSlopSquare) {
344 if (distance > mTouchSlopSquare) {
369 // A fling must travel the minimum tap distance
/frameworks/base/core/java/android/gesture/
H A DGestureUtils.java296 float distance = (float) Math.hypot(deltaX, deltaY);
297 if (distanceSoFar + distance >= increment) {
298 float ratio = (increment - distanceSoFar) / distance;
313 distanceSoFar += distance;
401 * Calculates the squared Euclidean distance between two vectors.
405 * @return the distance
418 * Calculates the cosine distance between two instances.
422 * @return the distance between 0 and Math.PI
434 * Calculates the "minimum" cosine distance between two instances.
439 * @return the distance betwee
[all...]
/frameworks/native/include/android/
H A Dsensor.h104 * The value corresponds to the distance to the nearest object in centimeters.
238 float distance; member in union:ASensorEvent::__anon1324::__anon1325

Completed in 764 milliseconds

1234