Searched refs:center (Results 1 - 20 of 20) sorted by relevance

/packages/apps/Dialer/InCallUI/src/com/android/incallui/
H A DInCallOrientationEventListener.java167 private static boolean isWithinThreshold(int value, int center, int threshold) { argument
168 return isWithinRange(value, center - threshold, center + threshold);
171 private static boolean isInLeftRange(int value, int center, int threshold) { argument
172 return isWithinRange(value, center - threshold, center);
175 private static boolean isInRightRange(int value, int center, int threshold) { argument
176 return isWithinRange(value, center, center + threshold);
/packages/apps/Camera2/src/com/android/camera/ui/focus/
H A DFocusRingView.java145 Point center = computeCenter();
146 mAutoFocusRing.setCenterX(center.x);
147 mAutoFocusRing.setCenterY(center.y);
148 mManualFocusRing.setCenterX(center.x);
149 mManualFocusRing.setCenterY(center.y);
191 Point center = computeCenter();
192 mAutoFocusRing.setCenterX(center.x);
193 mAutoFocusRing.setCenterY(center.y);
198 Log.i(TAG, "Computing center via preview size.");
201 Log.i(TAG, "Computing center vi
[all...]
/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/
H A DLauncherInstrumentationTestCase.java142 * Drags an icon to the center of homescreen.
145 Point center = icon.getVisibleCenter();
148 sendPointer(MotionEvent.ACTION_DOWN, center);
155 // Move to center
156 while(!moveLocation.equals(center)) {
157 center.x = getNextMoveValue(moveLocation.x, center.x);
158 center.y = getNextMoveValue(moveLocation.y, center.y);
159 sendPointer(MotionEvent.ACTION_MOVE, center);
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
H A DLocationClustering.java211 Point[] center = new Point[maxK]; // center of each group.
217 center[i] = new Point();
222 // (sum of distance from each point to its group center) * sqrt(k).
237 center[i].latRad = p.latRad;
238 center[i].lngRad = p.lngRad;
242 // step 2: assign each point to the nearest center.
256 p.latRad, p.lngRad, center[j].latRad, center[j].lngRad);
278 center[
[all...]
/packages/apps/Launcher3/src/com/android/launcher3/shortcuts/
H A DDeepShortcutView.java135 Point center = getIconCenter();
136 ValueAnimator openAnimator = new ZoomRevealOutlineProvider(center.x, center.y,
158 Point center = getIconCenter();
159 ValueAnimator closeAnimator = new ZoomRevealOutlineProvider(center.x, center.y,
181 * Returns the position of the center of the icon relative to the container.
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/
H A DCropMath.java137 * @param rot angle of rotation about rectangle center
156 * @param center center of the rotated rectangle
159 public static boolean pointInRotatedRect(float[] point, float[] rotatedRect, float[] center) { argument
161 float angle = getUnrotated(rotatedRect, center, unrotated);
166 * Resizes rectangle to have a certain aspect ratio (center remains
183 * Resizes rectangle to have a certain aspect ratio (center remains
248 private static float getUnrotated(float[] rotatedRect, float[] center, RectF unrotated) { argument
253 m.setRotate(-angle, center[0], center[
[all...]
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/camerafocus/
H A DPieItem.java140 public void setFixedSlice(float center, float sweep) { argument
141 mCenter = center;
H A DPieRenderer.java221 * guaranteed has center set
322 private Path makeSlice(float start, float end, int outer, int inner, Point center) { argument
324 new RectF(center.x - outer, center.y - outer, center.x + outer,
325 center.y + outer);
327 new RectF(center.x - inner, center.y - inner, center.x + inner,
328 center
[all...]
/packages/apps/Launcher2/src/com/android/launcher2/
H A DFolderIcon.java388 int[] center = new int[2];
389 float scale = getLocalCenterForIndex(index, center);
390 center[0] = (int) Math.round(scaleRelativeToDragLayer * center[0]);
391 center[1] = (int) Math.round(scaleRelativeToDragLayer * center[1]);
393 to.offset(center[0] - animateView.getMeasuredWidth() / 2,
394 center[1] - animateView.getMeasuredHeight() / 2);
475 private float getLocalCenterForIndex(int index, int[] center) { argument
483 center[
[all...]
/packages/apps/Launcher3/src/com/android/launcher3/folder/
H A DFolderIcon.java320 int[] center = new int[2];
321 float scale = getLocalCenterForIndex(index, index + 1, center);
322 center[0] = (int) Math.round(scaleRelativeToDragLayer * center[0]);
323 center[1] = (int) Math.round(scaleRelativeToDragLayer * center[1]);
325 to.offset(center[0] - animateView.getMeasuredWidth() / 2,
326 center[1] - animateView.getMeasuredHeight() / 2);
420 private float getLocalCenterForIndex(int index, int curNumItems, int[] center) { argument
429 center[
[all...]
/packages/apps/Gallery/src/com/android/camera/
H A DImageViewTouchBase.java183 // view's dimensions then center it (literally). If the image
186 protected void center(boolean horizontal, boolean vertical) { method in class:ImageViewTouchBase
317 center(true, true);
396 center(true, true);
H A DViewImage.java1104 center(true, true);
1146 center(true, false);
1157 center(true, false);
1163 center(false, true);
1168 center(false, true);
1184 center(true, true);
H A DCropImage.java197 mImageView.center(true, true);
226 // with the cropped image in the center and the extra space filled.
240 // If the srcRect is too big, use the center part of it.
243 // If the dstRect is too big, use the center part of it.
246 // Draw the cropped bitmap in the center
295 mImageView.center(true, true);
720 center(true, true);
724 // the user to move the image around. This call to center puts
728 center(true, true);
755 // view's center an
[all...]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/
H A DScrollAdapterView.java65 * Expandable items animation is based on distance to the center. Motivation behind not using two
68 * scale animated item cannot be kept in the center because scroll animation is too fast/too slow.
69 * By using distance to the scroll center, the animation of focus/unfocus will be accurately synced
71 * up to scroll center position; {@link #setHighItemTransform(Animator)} transforms items that are
72 * right or down to the scroll center position. It's recommended to use xml resource ref
75 * to the center. Here is an example that scales the center item to "1.2" of original size, any item
76 * far from 60dip to scroll center has normal scale (scale = 1):
113 * @param targetCenter final center position of view to the left edge of ScrollAdapterView
279 int mScrollCenter; // cached scroll center
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/app/
H A DAlbumSetPage.java108 // The eyes' position of the user, the origin is at the center of the
180 private void getSlotCenter(int slotIndex, int center[]) { argument
186 center[0] = offset.left + (r.left + r.right) / 2 - scrollX;
187 center[1] = offset.top + (r.top + r.bottom) / 2 - scrollY;
251 int[] center = new int[2];
252 getSlotCenter(slotIndex, center);
253 data.putIntArray(AlbumPage.KEY_SET_CENTER, center);
/packages/apps/Calendar/src/com/android/calendar/
H A DDayView.java483 /** The hour at the center two touch points */
3208 // Figure out where we came from and compute the center of that area.
3323 int center = (left + right) / 2;
3327 if (currentRight <= center) {
3328 currentDistance = center - currentRight;
3329 } else if (currentLeft >= center) {
3330 currentDistance = currentLeft - center;
3334 if (neighborRight <= center) {
3335 neighborDistance = center - neighborRight;
3336 } else if (neighborLeft >= center) {
3555 drawEventText(StaticLayout eventLayout, Rect rect, Canvas canvas, int top, int bottom, boolean center) argument
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
H A DPhotoView.java711 // the center of the view.
749 // Find out the bitmap coordinates of the center of the view
921 // Draw the video play icon at the center
1441 // Determine how many photos we need to draw in addition to the center
1502 int center = getWidth() / 2;
1504 if (curr.left > center && mPrevBound < 0) {
1506 int currDist = curr.left - center;
1507 int prevDist = center - prev.right;
1511 } else if (curr.right < center && mNextBound > 0) {
1513 int currDist = center
[all...]
H A DSlotView.java158 // is changed (like orientation change). We choose to keep the center
360 public ScatteringAnimation(RelativePosition center) { argument
361 mCenter = center;
464 // to put the slots towards to the center of the display.
H A DTileImageView.java300 // center of the ImageViewer.
330 // Calculate where the center of the image is, in the view coordinates.
331 public void getImageCenter(Point center) { argument
336 // The distance between the center of the view to the center of the
338 // coordinates correspond to the center of view)
350 center.x = Math.round(viewW / 2f + distW * mScale);
351 center.y = Math.round(viewH / 2f + distH * mScale);
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
H A DPhotoTable.java350 double[] center = { photo.getX() + width / 2f,
352 return center;

Completed in 763 milliseconds