Home
last modified time | relevance | path

Searched refs:viewWidth (Results 1 – 24 of 24) sorted by relevance

/packages/apps/Dialer/java/com/android/incallui/videosurface/impl/
DVideoScale.java31 float viewWidth = textureView.getWidth(); in scaleVideoAndFillView() local
33 float viewAspectRatio = viewWidth / viewHeight; in scaleVideoAndFillView()
40 float scaleFactor = viewWidth / videoWidth; in scaleVideoAndFillView()
47 scaleWidth = desiredScaledWidth / viewWidth; in scaleVideoAndFillView()
56 scaleWidth = viewHeight / viewWidth * scaleY; in scaleVideoAndFillView()
57 scaleHeight = viewWidth / viewHeight * scaleX; in scaleVideoAndFillView()
69 viewWidth, in scaleVideoAndFillView()
82 viewWidth / 2.0f, in scaleVideoAndFillView()
86 transform.postRotate(rotationDegrees, viewWidth / 2.0f, viewHeight / 2.0f); in scaleVideoAndFillView()
97 int viewWidth = textureView.getWidth(); in scaleVideoMaintainingAspectRatio() local
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/dragndrop/
DLivePreviewWidgetCell.java62 int viewWidth = dp.cellWidthPx * info.spanX; in generateFromRemoteViews() local
68 v.measure(MeasureSpec.makeMeasureSpec(viewWidth, MeasureSpec.EXACTLY), in generateFromRemoteViews()
71 viewWidth = v.getMeasuredWidth(); in generateFromRemoteViews()
73 v.layout(0, 0, viewWidth, viewHeight); in generateFromRemoteViews()
78 preScaledWidthOut[0] = viewWidth; in generateFromRemoteViews()
81 if (viewWidth > previewSize) { in generateFromRemoteViews()
82 scale = ((float) previewSize) / viewWidth; in generateFromRemoteViews()
87 bitmapWidth = viewWidth; in generateFromRemoteViews()
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/
DGeometryMathUtils.java332 boolean reflectRotation, Rect bmapDimens, float viewWidth, float viewHeight) { in getImageToScreenMatrix() argument
335 bmapDimens.height(), viewWidth, viewHeight); in getImageToScreenMatrix()
374 float originalHeight, float viewWidth, float viewHeight) { in getOriginalToScreen() argument
381 (int) originalHeight, (int) viewWidth, (int) viewHeight); in getOriginalToScreen()
402 Bitmap photo, int viewWidth, int viewHeight) { in drawTransformedCropped() argument
408 viewWidth, viewHeight); in drawTransformedCropped()
441 int bitmapHeight, int viewWidth, int viewHeight) { in getFullGeometryToScreenMatrix() argument
448 float scale = GeometryMathUtils.scale(bw, bh, viewWidth, viewHeight); in getFullGeometryToScreenMatrix()
450 float s = Math.min(viewWidth / (float) bitmapWidth, viewHeight / (float) bitmapHeight); in getFullGeometryToScreenMatrix()
453 m.postTranslate(viewWidth / 2f, viewHeight / 2f); in getFullGeometryToScreenMatrix()
[all …]
DImageStraighten.java207 int imageHeight, int viewWidth, int viewHeight) { in updateCurrentCrop() argument
225 float scale = GeometryMathUtils.scale(iw, ih, viewWidth, viewHeight); in updateCurrentCrop()
229 tmp.offset(viewWidth / 2f - tmp.centerX(), viewHeight / 2f - tmp.centerY()); in updateCurrentCrop()
232 imageHeight, viewWidth, viewHeight); in updateCurrentCrop()
253 int viewWidth = canvas.getWidth(); in onDraw() local
258 imageHeight, viewWidth, viewHeight); in onDraw()
269 imageHeight, viewWidth, viewHeight); in onDraw()
281 float step = Math.max(viewWidth, viewHeight) / NBLINES; in onDraw()
291 canvas.drawLine(0, p, viewWidth, p, mPaint); in onDraw()
/packages/apps/Gallery/src/com/android/camera/
DImageViewTouchBase.java155 final int viewWidth = getWidth(); in setImageRotateBitmapResetBase() local
157 if (viewWidth <= 0) { in setImageRotateBitmapResetBase()
216 int viewWidth = getWidth(); in center() local
217 if (width < viewWidth) { in center()
218 deltaX = (viewWidth - width) / 2 - rect.left; in center()
221 } else if (rect.right < viewWidth) { in center()
222 deltaX = viewWidth - rect.right; in center()
260 float viewWidth = getWidth(); in getProperBaseMatrix() local
269 float widthScale = Math.min(viewWidth / w, 3.0f); in getProperBaseMatrix()
277 (viewWidth - w * scale) / 2F, in getProperBaseMatrix()
/packages/apps/Car/Notification/src/com/android/car/notification/
DHeadsUpNotificationOnTouchListener.java77 int viewWidth = mView.getWidth(); in onTouch() local
100 if (Math.abs(deltaX) > viewWidth * THRESHOLD) { in onTouch()
115 .translationX(dismissRight ? viewWidth : -viewWidth) in onTouch()
168 1f - 2f * Math.abs(deltaX) / viewWidth))); in onTouch()
DDismissAnimationHelper.java100 int viewWidth = viewHolder.itemView.getWidth(); in animateDismiss() local
102 .translationX(swipeDirection == Direction.RIGHT ? viewWidth : -viewWidth) in animateDismiss()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/widget/
DWallpaperThumbnailView.java56 final int viewWidth = getWidth() - getPaddingLeft() - getPaddingRight(); in recomputeImageMatrix() local
62 if (drawableWidth * viewHeight > drawableHeight * viewWidth) { in recomputeImageMatrix()
65 scale = (float) viewWidth / drawableWidth; in recomputeImageMatrix()
79 float dx = -((drawableWidth * scale) - viewWidth); in recomputeImageMatrix()
/packages/apps/Car/libs/car-ui-lib/src/com/android/car/ui/recyclerview/
DDefaultScrollBar.java216 int viewWidth = view.getMeasuredWidth(); in layoutViewCenteredFromTop() local
217 int viewLeft = (availableWidth - viewWidth) / 2; in layoutViewCenteredFromTop()
218 view.layout(viewLeft, top, viewLeft + viewWidth, top + view.getMeasuredHeight()); in layoutViewCenteredFromTop()
231 int viewWidth = view.getMeasuredWidth(); in layoutViewCenteredFromBottom() local
232 int viewLeft = (availableWidth - viewWidth) / 2; in layoutViewCenteredFromBottom()
233 view.layout(viewLeft, bottom - view.getMeasuredHeight(), viewLeft + viewWidth, bottom); in layoutViewCenteredFromBottom()
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/widget/
DCarScrollBar.java309 int viewWidth = view.getMeasuredWidth(); in layoutViewCenteredFromTop() local
310 int viewLeft = (availableWidth - viewWidth) / 2; in layoutViewCenteredFromTop()
311 view.layout(viewLeft, top, viewLeft + viewWidth, in layoutViewCenteredFromTop()
325 int viewWidth = view.getMeasuredWidth(); in layoutViewCenteredFromBottom() local
326 int viewLeft = (availableWidth - viewWidth) / 2; in layoutViewCenteredFromBottom()
328 viewLeft + viewWidth, bottom); in layoutViewCenteredFromBottom()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DPhotoView.java1615 private static int gapToSide(int imageWidth, int viewWidth) { in gapToSide() argument
1616 return Math.max(0, (viewWidth - imageWidth) / 2); in gapToSide()
1718 int viewWidth) { in calculateMoveOutProgress() argument
1728 if (w < viewWidth) { in calculateMoveOutProgress()
1729 int zx = viewWidth / 2 - w / 2; in calculateMoveOutProgress()
1731 return -(left - zx) / (float) (viewWidth - zx); // progress = (0, -1] in calculateMoveOutProgress()
1744 return -left / (float) viewWidth; in calculateMoveOutProgress()
1747 if (right < viewWidth) { in calculateMoveOutProgress()
1748 return (viewWidth - right) / (float) viewWidth; in calculateMoveOutProgress()
DSlideshowView.java139 int viewWidth = getWidth(); in apply() local
143 viewWidth / mWidth, (float) viewHeight / mHeight); in apply()
146 float centerX = viewWidth / 2 + mMovingVector.x * mProgress; in apply()
/packages/apps/Messaging/src/com/android/messaging/ui/animation/
DPopupTransitionAnimation.java269 final float viewWidth = mViewToAnimate.getWidth(); in initPopupWindow()
271 if (viewWidth > 0 && viewHeight > 0) { in initPopupWindow()
272 canvas.scale(mCurrentRect.width() / viewWidth, in initPopupWindow()
/packages/apps/LegacyCamera/src/com/android/camera/
DModePicker.java258 int viewWidth = mModeSelectionIcon[MODE_CAMERA].getWidth(); in onLayout() local
261 int padding = (viewWidth - iconWidth) / 2; in onLayout()
262 int l = mModeSelectionFrame.getLeft() + mCurrentMode * viewWidth; in onLayout()
DUtil.java577 int viewWidth, int viewHeight) { in prepareMatrix() argument
584 matrix.postScale(viewWidth / 2000f, viewHeight / 2000f); in prepareMatrix()
585 matrix.postTranslate(viewWidth / 2f, viewHeight / 2f); in prepareMatrix()
/packages/apps/TV/src/com/android/tv/ui/
DTvViewUiManager.java224 int viewWidth = mContentView.getWidth(); in isDisplayModeAvailable() local
228 if (viewWidth <= 0 || viewHeight <= 0 || videoDisplayAspectRatio <= 0f) { in isDisplayModeAvailable()
235 + viewWidth in isDisplayModeAvailable()
244 float viewRatio = viewWidth / (float) viewHeight; in isDisplayModeAvailable()
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/camerafocus/
DFocusOverlayManager.java461 private void prepareMatrix(Matrix matrix, boolean mirror, int viewWidth, int viewHeight) { in prepareMatrix() argument
466 matrix.postScale(viewWidth / 2000f, viewHeight / 2000f); in prepareMatrix()
467 matrix.postTranslate(viewWidth / 2f, viewHeight / 2f); in prepareMatrix()
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/camerafocus/
DFocusOverlayManager.java561 int viewWidth, int viewHeight) { in prepareMatrix() argument
568 matrix.postScale(viewWidth / 2000f, viewHeight / 2000f); in prepareMatrix()
569 matrix.postTranslate(viewWidth / 2f, viewHeight / 2f); in prepareMatrix()
/packages/apps/PermissionController/src/android/support/wearable/view/
DCircledImageView.java345 final int viewWidth = getMeasuredWidth(); in onLayout() local
353 ? imageCirclePercentage * viewWidth / nativeDrawableWidth : 1, in onLayout()
363 final int drawableLeft = (viewWidth - drawableWidth) / 2 in onLayout()
/packages/apps/Settings/src/com/android/settings/biometrics/face/
DFaceEnrollPreviewFragment.java306 private void configureTransform(int viewWidth, int viewHeight) { in configureTransform() argument
312 float scaleX = (float) viewWidth / mPreviewSize.getWidth(); in configureTransform()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/biometrics/face/
DFaceEnrollPreviewFragment.java305 private void configureTransform(int viewWidth, int viewHeight) { in configureTransform() argument
311 float scaleX = (float) viewWidth / mPreviewSize.getWidth(); in configureTransform()
/packages/apps/Launcher3/src/com/android/launcher3/
DButtonDropTarget.java326 int viewWidth = dragObject.dragView.getMeasuredWidth(); in getIconRect() local
356 final int xOffset = -(viewWidth - width) / 2; in getIconRect()
/packages/apps/Camera2/src/com/android/camera/util/
DCameraUtil.java731 int viewWidth, int viewHeight) { in prepareMatrix() argument
738 matrix.postScale(viewWidth / 2000f, viewHeight / 2000f); in prepareMatrix()
739 matrix.postTranslate(viewWidth / 2f, viewHeight / 2f); in prepareMatrix()
/packages/apps/Camera2/src/com/android/camera/widget/
DFilmstripView.java2063 private int estimateMinX(int index, int leftPos, int viewWidth) { in estimateMinX() argument
2064 return leftPos - (index + 100) * (viewWidth + mViewGapInPixel); in estimateMinX()
2067 private int estimateMaxX(int index, int leftPos, int viewWidth) { in estimateMaxX() argument
2070 * (viewWidth + mViewGapInPixel); in estimateMaxX()