/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/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/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/Camera2Video/kotlinApp/Application/src/main/java/com/example/android/camera2video/ |
D | AutoFitTextureView.kt | 44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio() 45 if (width < 0 || height < 0) { in setAspectRatio() 49 ratioHeight = height in setAspectRatio() 56 val height = View.MeasureSpec.getSize(heightMeasureSpec) in onMeasure() constant 58 setMeasuredDimension(width, height) in onMeasure() 60 if (width < ((height * ratioWidth) / ratioHeight)) { in onMeasure() 63 setMeasuredDimension((height * ratioWidth) / ratioHeight, height) in onMeasure()
|
D | Camera2VideoFragment.kt | 88 override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureAvailable() 89 openCamera(width, height) in onSurfaceTextureAvailable() 92 override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureSizeChanged() 93 configureTransform(width, height) in onSurfaceTextureSizeChanged() 172 configureTransform(textureView.width, textureView.height) in onSurfaceTextureDestroyed() 219 openCamera(textureView.width, textureView.height) in onResume() 322 private fun openCamera(width: Int, height: Int) { in openCamera() 345 width, height, videoSize) in openCamera() 348 textureView.setAspectRatio(previewSize.width, previewSize.height) in openCamera() 350 textureView.setAspectRatio(previewSize.height, previewSize.width) in openCamera() [all …]
|
D | CompareSizesByArea.kt | 29 signum(lhs.width.toLong() * lhs.height - rhs.width.toLong() * rhs.height)
|
/developers/samples/android/media/Camera2Basic/kotlinApp/Application/src/main/java/com/example/android/camera2basic/ |
D | AutoFitTextureView.kt | 44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio() 45 if (width < 0 || height < 0) { in setAspectRatio() 49 ratioHeight = height in setAspectRatio() 56 val height = View.MeasureSpec.getSize(heightMeasureSpec) in onMeasure() constant 58 setMeasuredDimension(width, height) in onMeasure() 60 if (width < height * ratioWidth / ratioHeight) { in onMeasure() 63 setMeasuredDimension(height * ratioWidth / ratioHeight, height) in onMeasure()
|
D | Camera2BasicFragment.kt | 69 override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureAvailable() 70 openCamera(width, height) in onSurfaceTextureAvailable() 73 override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureSizeChanged() 74 configureTransform(width, height) in onSurfaceTextureSizeChanged() 277 openCamera(textureView.width, textureView.height) in onResume() 316 private fun setUpCameraOutputs(width: Int, height: Int) { in setUpCameraOutputs() 336 imageReader = ImageReader.newInstance(largest.width, largest.height, in setUpCameraOutputs() 350 val rotatedPreviewWidth = if (swappedDimensions) height else width in setUpCameraOutputs() 351 val rotatedPreviewHeight = if (swappedDimensions) width else height in setUpCameraOutputs() 368 textureView.setAspectRatio(previewSize.width, previewSize.height) in setUpCameraOutputs() [all …]
|
D | CompareSizesByArea.kt | 15 signum(lhs.width.toLong() * lhs.height - rhs.width.toLong() * rhs.height)
|
/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/samples/android/media/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/ |
D | FixedAspectSurfaceView.java | 88 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 112 float boxAspectRatio = width / (float) height; in onMeasure() 135 width = (int) (height * mAspectRatio); in onMeasure() 137 height = (int) (width / mAspectRatio); in onMeasure() 142 height = View.resolveSizeAndState(height, heightMeasureSpec, 0); in onMeasure() 145 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/samples/android/common/src/java/com/example/android/common/media/ |
D | CameraHelper.java | 77 double ratio = (double) size.width / size.height; in getOptimalVideoSize() 80 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 82 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize() 90 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 92 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize()
|
/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/samples/android/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/ |
D | UIAnimation.java | 93 if ((float) finalBounds.width() / finalBounds.height() in zoomImageFromThumb() 94 > (float) startBounds.width() / startBounds.height()) { in zoomImageFromThumb() 95 startScale = (float) startBounds.height() / finalBounds.height(); in zoomImageFromThumb() 102 float startHeight = startScale * finalBounds.height(); in zoomImageFromThumb() 103 float deltaHeight = (startHeight - startBounds.height()) / 2; in zoomImageFromThumb()
|
/developers/samples/android/sensors/BatchStepSensor/ |
D | README.md | 41 …height="400" alt="Screenshot"/> <img src="screenshots/screenshot2.png" height="400" alt="Screensho…
|
/developers/samples/android/ui/window/BasicImmersiveMode/Application/src/main/java/com/example/android/basicimmersivemode/ |
D | BasicImmersiveModeFragment.java | 43 int height = decorView.getHeight(); in onActivityCreated() 44 Log.i(TAG, "Current height: " + height); in onActivityCreated()
|
/developers/samples/android/security/keystore/BasicAndroidKeyStore/ |
D | README.md | 40 …height="400" alt="Screenshot"/> <img src="screenshots/screenshot2.png" height="400" alt="Screensho…
|
/developers/samples/android/ui/window/ImmersiveMode/Application/src/main/java/com/example/android/immersivemode/ |
D | ImmersiveModeFragment.java | 44 int height = decorView.getHeight(); in onActivityCreated() 45 Log.i(TAG, "Current height: " + height); in onActivityCreated()
|
/developers/samples/android/content/webview/PermissionRequest/Application/src/main/assets/ |
D | sample.css | 26 height: 48px; 34 height: 180px;
|
/developers/samples/android/ui/activityscenetransition/ActivitySceneTransitionBasic/ |
D | README.md | 29 …height="400" alt="Screenshot"/> <img src="screenshots/2-transition.png" height="400" alt="Screensh…
|
/developers/samples/android/media/PictureInPicture/kotlinApp/app/src/main/java/com/example/android/pictureinpicture/widget/ |
D | MovieView.kt | 169 width: Int, height: Int) { in <lambda>() 188 val height = View.MeasureSpec.getSize(heightMeasureSpec) in <lambda>() constant 198 … super.onMeasure(View.MeasureSpec.makeMeasureSpec((height / aspectRatio).toInt(), in <lambda>() 206 val viewRatio = height.toFloat() / width in <lambda>() 208 val padding = ((width - height / aspectRatio) / 2).toInt() in <lambda>() 211 val padding = ((height - width * aspectRatio) / 2).toInt() in <lambda>()
|
/developers/samples/android/ui/graphics/DisplayingBitmaps/Application/src/main/java/com/example/android/displayingbitmaps/ui/ |
D | ImageGridFragment.java | 300 if (imageView.getLayoutParams().height != mItemHeight) { in getView() 317 public void setItemHeight(int height) { in setItemHeight() argument 318 if (height == mItemHeight) { in setItemHeight() 321 mItemHeight = height; in setItemHeight() 324 mImageFetcher.setImageSize(height); in setItemHeight()
|
/developers/samples/android/ui/window/MultiWindowPlayground/kotlinApp/Application/src/main/java/com/android/multiwindowplayground/logger/ |
D | LogFragment.kt | 45 height = WRAP_CONTENT in inflateViews() 84 scrollView.run { post { smoothScrollTo(0, scrollView.bottom + logView.height) }} in onCreateView()
|