/developers/build/prebuilts/gradle/Camera2Raw/Application/src/main/java/com/example/android/camera2raw/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 55 if (mRatioWidth == width && mRatioHeight == height) { in setAspectRatio() 59 mRatioHeight = height; in setAspectRatio() 67 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 69 setMeasuredDimension(width, height); in onMeasure() 71 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 74 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/samples/android/media/Camera2Raw/Application/src/main/java/com/example/android/camera2raw/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 55 if (mRatioWidth == width && mRatioHeight == height) { in setAspectRatio() 59 mRatioHeight = height; in setAspectRatio() 67 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 69 setMeasuredDimension(width, height); in onMeasure() 71 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 74 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/samples/android/media/MediaRouter/Application/src/main/java/com/example/android/mediarouter/player/ |
D | OverlayDisplayWindow.java | 62 int width, int height, int gravity) { in OverlayDisplayWindow() argument 66 mHeight = height; in OverlayDisplayWindow() 71 int width, int height, int gravity) { in create() argument 73 return new JellybeanMr1Impl(context, name, width, height, gravity); in create() 75 return new LegacyImpl(context, name, width, height, gravity); in create() 91 public abstract void updateAspectRatio(int width, int height); in updateAspectRatio() argument 110 int width, int height, int gravity) { in LegacyImpl() argument 111 super(context, name, width, height, gravity); in LegacyImpl() 136 int height = (int)(display.getHeight() * INITIAL_SCALE); in show() local 138 height = mHeight * width / mWidth; in show() [all …]
|
D | LocalPlayer.java | 353 int height = mMediaPlayer.getVideoHeight(); in updateVideoRect() local 354 if (width > 0 && height > 0) { in updateVideoRect() 356 mVideoHeight = height; in updateVideoRect() 453 int width, int height) { in surfaceChanged() argument 455 Log.d(TAG, "surfaceChanged: " + width + "x" + height); in surfaceChanged() 480 int height = getVideoHeight(); in updateSize() local 481 if (width > 0 && height > 0) { in updateSize() 489 if (surfaceWidth * height < surfaceHeight * width) { in updateSize() 493 lp.height = surfaceWidth * height / width; in updateSize() 497 lp.width = surfaceHeight * width / height; in updateSize() [all …]
|
/developers/build/prebuilts/gradle/MediaRouter/Application/src/main/java/com/example/android/mediarouter/player/ |
D | OverlayDisplayWindow.java | 62 int width, int height, int gravity) { in OverlayDisplayWindow() argument 66 mHeight = height; in OverlayDisplayWindow() 71 int width, int height, int gravity) { in create() argument 73 return new JellybeanMr1Impl(context, name, width, height, gravity); in create() 75 return new LegacyImpl(context, name, width, height, gravity); in create() 91 public abstract void updateAspectRatio(int width, int height); in updateAspectRatio() argument 110 int width, int height, int gravity) { in LegacyImpl() argument 111 super(context, name, width, height, gravity); in LegacyImpl() 136 int height = (int)(display.getHeight() * INITIAL_SCALE); in show() local 138 height = mHeight * width / mWidth; in show() [all …]
|
D | LocalPlayer.java | 353 int height = mMediaPlayer.getVideoHeight(); in updateVideoRect() local 354 if (width > 0 && height > 0) { in updateVideoRect() 356 mVideoHeight = height; in updateVideoRect() 453 int width, int height) { in surfaceChanged() argument 455 Log.d(TAG, "surfaceChanged: " + width + "x" + height); in surfaceChanged() 480 int height = getVideoHeight(); in updateSize() local 481 if (width > 0 && height > 0) { in updateSize() 489 if (surfaceWidth * height < surfaceHeight * width) { in updateSize() 493 lp.height = surfaceWidth * height / width; in updateSize() 497 lp.width = surfaceHeight * width / height; in updateSize() [all …]
|
/developers/samples/android/media/Camera2Video/Application/src/main/java/com/example/android/camera2video/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 56 mRatioHeight = height; in setAspectRatio() 64 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 66 setMeasuredDimension(width, height); in onMeasure() 68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 71 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/samples/android/media/Camera2Basic/Application/src/main/java/com/example/android/camera2basic/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 56 mRatioHeight = height; in setAspectRatio() 64 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 66 setMeasuredDimension(width, height); in onMeasure() 68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 71 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/build/prebuilts/gradle/Camera2Video/Application/src/main/java/com/example/android/camera2video/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 56 mRatioHeight = height; in setAspectRatio() 64 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 66 setMeasuredDimension(width, height); in onMeasure() 68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 71 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/build/prebuilts/gradle/Camera2Basic/Application/src/main/java/com/example/android/camera2basic/ |
D | AutoFitTextureView.java | 51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument 52 if (width < 0 || height < 0) { in setAspectRatio() 56 mRatioHeight = height; in setAspectRatio() 64 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 66 setMeasuredDimension(width, height); in onMeasure() 68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 71 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/developers/samples/android/media/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/ |
D | FixedAspectSurfaceView.java | 90 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 113 float boxAspectRatio = width / (float) height; in onMeasure() 136 width = (int) (height * mAspectRatio); in onMeasure() 138 height = (int) (width / mAspectRatio); in onMeasure() 143 height = View.resolveSizeAndState(height, heightMeasureSpec, 0); in onMeasure() 146 setMeasuredDimension(width, height); in onMeasure()
|
/developers/build/prebuilts/gradle/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/ |
D | FixedAspectSurfaceView.java | 90 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 113 float boxAspectRatio = width / (float) height; in onMeasure() 136 width = (int) (height * mAspectRatio); in onMeasure() 138 height = (int) (width / mAspectRatio); in onMeasure() 143 height = View.resolveSizeAndState(height, heightMeasureSpec, 0); in onMeasure() 146 setMeasuredDimension(width, height); in onMeasure()
|
/developers/samples/android/ui/graphics/DisplayingBitmaps/Application/src/main/java/com/example/android/displayingbitmaps/util/ |
D | ImageResizer.java | 70 public void setImageSize(int width, int height) { in setImageSize() argument 72 mImageHeight = height; in setImageSize() 235 final int height = options.outHeight; in calculateInSampleSize() local 239 if (height > reqHeight || width > reqWidth) { in calculateInSampleSize() 241 final int halfHeight = height / 2; in calculateInSampleSize() 257 long totalPixels = width * height / inSampleSize; in calculateInSampleSize()
|
/developers/build/prebuilts/gradle/DisplayingBitmaps/Application/src/main/java/com/example/android/displayingbitmaps/util/ |
D | ImageResizer.java | 70 public void setImageSize(int width, int height) { in setImageSize() argument 72 mImageHeight = height; in setImageSize() 235 final int height = options.outHeight; in calculateInSampleSize() local 239 if (height > reqHeight || width > reqWidth) { in calculateInSampleSize() 241 final int halfHeight = height / 2; in calculateInSampleSize() 257 long totalPixels = width * height / inSampleSize; in calculateInSampleSize()
|
/developers/build/prebuilts/gradle/SwipeRefreshListFragment/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/developers/build/prebuilts/gradle/BasicTransition/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/developers/build/prebuilts/gradle/SlidingTabsColors/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/developers/build/prebuilts/gradle/SwipeRefreshMultipleViews/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/developers/samples/android/common/src/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/developers/build/prebuilts/gradle/SwipeRefreshLayoutBasic/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/developers/build/prebuilts/gradle/SlidingTabsBasic/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/developers/samples/android/common/src/java/com/example/android/common/media/ |
D | CameraHelper.java | 76 double ratio = (double) size.width / size.height; in getOptimalVideoSize() 79 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 81 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize() 89 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 91 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize()
|
/developers/build/prebuilts/gradle/MediaRecorder/Application/src/main/java/com/example/android/common/media/ |
D | CameraHelper.java | 76 double ratio = (double) size.width / size.height; in getOptimalVideoSize() 79 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 81 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize() 89 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 91 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize()
|
/developers/build/prebuilts/gradle/BasicRenderScript/Application/src/main/java/com/example/android/common/media/ |
D | CameraHelper.java | 76 double ratio = (double) size.width / size.height; in getOptimalVideoSize() 79 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 81 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize() 89 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 91 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize()
|
/developers/build/prebuilts/gradle/BasicMediaDecoder/Application/src/main/java/com/example/android/common/media/ |
D | CameraHelper.java | 76 double ratio = (double) size.width / size.height; in getOptimalVideoSize() 79 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 81 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize() 89 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 91 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize()
|