Home
last modified time | relevance | path

Searched refs:width (Results 1 – 25 of 74) sorted by relevance

123

/developers/build/prebuilts/gradle/Camera2Raw/Application/src/main/java/com/example/android/camera2raw/
DAutoFitTextureView.java51 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()
58 mRatioWidth = width; in setAspectRatio()
66 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
69 setMeasuredDimension(width, height); in onMeasure()
71 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
72 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/samples/android/media/Camera2Raw/Application/src/main/java/com/example/android/camera2raw/
DAutoFitTextureView.java51 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()
58 mRatioWidth = width; in setAspectRatio()
66 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
69 setMeasuredDimension(width, height); in onMeasure()
71 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
72 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/samples/android/media/MediaRouter/Application/src/main/java/com/example/android/mediarouter/player/
DOverlayDisplayWindow.java62 int width, int height, int gravity) { in OverlayDisplayWindow() argument
65 mWidth = width; 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()
135 int width = (int)(display.getWidth() * INITIAL_SCALE); in show() local
138 height = mHeight * width / mWidth; in show()
[all …]
DLocalPlayer.java352 int width = mMediaPlayer.getVideoWidth(); in updateVideoRect() local
354 if (width > 0 && height > 0) { in updateVideoRect()
355 mVideoWidth = width; in updateVideoRect()
453 int width, int height) { in surfaceChanged() argument
455 Log.d(TAG, "surfaceChanged: " + width + "x" + height); in surfaceChanged()
479 int width = getVideoWidth(); in updateSize() local
481 if (width > 0 && height > 0) { in updateSize()
489 if (surfaceWidth * height < surfaceHeight * width) { in updateSize()
492 lp.width = surfaceWidth; in updateSize()
493 lp.height = surfaceWidth * height / width; in updateSize()
[all …]
/developers/build/prebuilts/gradle/MediaRouter/Application/src/main/java/com/example/android/mediarouter/player/
DOverlayDisplayWindow.java62 int width, int height, int gravity) { in OverlayDisplayWindow() argument
65 mWidth = width; 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()
135 int width = (int)(display.getWidth() * INITIAL_SCALE); in show() local
138 height = mHeight * width / mWidth; in show()
[all …]
DLocalPlayer.java352 int width = mMediaPlayer.getVideoWidth(); in updateVideoRect() local
354 if (width > 0 && height > 0) { in updateVideoRect()
355 mVideoWidth = width; in updateVideoRect()
453 int width, int height) { in surfaceChanged() argument
455 Log.d(TAG, "surfaceChanged: " + width + "x" + height); in surfaceChanged()
479 int width = getVideoWidth(); in updateSize() local
481 if (width > 0 && height > 0) { in updateSize()
489 if (surfaceWidth * height < surfaceHeight * width) { in updateSize()
492 lp.width = surfaceWidth; in updateSize()
493 lp.height = surfaceWidth * height / width; in updateSize()
[all …]
/developers/samples/android/media/Camera2Video/Application/src/main/java/com/example/android/camera2video/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 mRatioWidth = width; in setAspectRatio()
63 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
66 setMeasuredDimension(width, height); in onMeasure()
68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
69 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/samples/android/media/Camera2Basic/Application/src/main/java/com/example/android/camera2basic/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 mRatioWidth = width; in setAspectRatio()
63 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
66 setMeasuredDimension(width, height); in onMeasure()
68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
69 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/build/prebuilts/gradle/Camera2Video/Application/src/main/java/com/example/android/camera2video/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 mRatioWidth = width; in setAspectRatio()
63 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
66 setMeasuredDimension(width, height); in onMeasure()
68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
69 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
DCamera2VideoFragment.java128 int width, int height) {
129 openCamera(width, height);
134 int width, int height) {
135 configureTransform(width, height);
255 private static Size chooseOptimalSize(Size[] choices, int width, int height, Size aspectRatio) { in chooseOptimalSize() argument
262 option.getWidth() >= width && option.getHeight() >= height) { in chooseOptimalSize()
416 private void openCamera(int width, int height) { in openCamera() argument
440 width, height, mVideoSize); in openCamera()
448 configureTransform(width, height); in openCamera()
/developers/build/prebuilts/gradle/Camera2Basic/Application/src/main/java/com/example/android/camera2basic/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 mRatioWidth = width; in setAspectRatio()
63 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
66 setMeasuredDimension(width, height); in onMeasure()
68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
69 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/samples/android/media/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/
DFixedAspectSurfaceView.java89 int width = MeasureSpec.getSize(widthMeasureSpec); 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()
142 width = View.resolveSizeAndState(width, widthMeasureSpec, 0); in onMeasure()
146 setMeasuredDimension(width, height); in onMeasure()
/developers/build/prebuilts/gradle/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/
DFixedAspectSurfaceView.java89 int width = MeasureSpec.getSize(widthMeasureSpec); 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()
142 width = View.resolveSizeAndState(width, widthMeasureSpec, 0); in onMeasure()
146 setMeasuredDimension(width, height); in onMeasure()
/developers/build/prebuilts/gradle/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/
DOpenGLWatchFaceService.java223 public void onGlSurfaceCreated(int width, int height) { in onGlSurfaceCreated() argument
225 Log.d(TAG, "onGlSurfaceCreated: " + width + " x " + height); in onGlSurfaceCreated()
227 super.onGlSurfaceCreated(width, height); in onGlSurfaceCreated()
230 final float aspectRatio = (float) width / height; in onGlSurfaceCreated()
257 float width, float length, float[] color) { in createHand() argument
262 -width / 2, 0, 0, // bottom left in createHand()
263 width / 2, 0, 0 // bottom right in createHand()
332 private float[] getTickTriangleCoords(float width, float length, int angleDegrees) { in getTickTriangleCoords() argument
337 width / 2, length + 1, 0, // bottom left in getTickTriangleCoords()
338 -width / 2, length + 1, 0 // bottom right in getTickTriangleCoords()
/developers/samples/android/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/
DOpenGLWatchFaceService.java223 public void onGlSurfaceCreated(int width, int height) { in onGlSurfaceCreated() argument
225 Log.d(TAG, "onGlSurfaceCreated: " + width + " x " + height); in onGlSurfaceCreated()
227 super.onGlSurfaceCreated(width, height); in onGlSurfaceCreated()
230 final float aspectRatio = (float) width / height; in onGlSurfaceCreated()
257 float width, float length, float[] color) { in createHand() argument
262 -width / 2, 0, 0, // bottom left in createHand()
263 width / 2, 0, 0 // bottom right in createHand()
332 private float[] getTickTriangleCoords(float width, float length, int angleDegrees) { in getTickTriangleCoords() argument
337 width / 2, length + 1, 0, // bottom left in getTickTriangleCoords()
338 -width / 2, length + 1, 0 // bottom right in getTickTriangleCoords()
/developers/samples/android/ui/graphics/DisplayingBitmaps/Application/src/main/java/com/example/android/displayingbitmaps/util/
DImageResizer.java70 public void setImageSize(int width, int height) { in setImageSize() argument
71 mImageWidth = width; in setImageSize()
236 final int width = options.outWidth; in calculateInSampleSize() local
239 if (height > reqHeight || width > reqWidth) { in calculateInSampleSize()
242 final int halfWidth = width / 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/
DImageResizer.java70 public void setImageSize(int width, int height) { in setImageSize() argument
71 mImageWidth = width; in setImageSize()
236 final int width = options.outWidth; in calculateInSampleSize() local
239 if (height > reqHeight || width > reqWidth) { in calculateInSampleSize()
242 final int halfWidth = width / 2; in calculateInSampleSize()
257 long totalPixels = width * height / inSampleSize; in calculateInSampleSize()
/developers/build/prebuilts/gradle/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/
DUIAnimation.java93 if ((float) finalBounds.width() / finalBounds.height() in zoomImageFromThumb()
94 > (float) startBounds.width() / startBounds.height()) { in zoomImageFromThumb()
96 float startWidth = startScale * finalBounds.width(); in zoomImageFromThumb()
97 float deltaWidth = (startWidth - startBounds.width()) / 2; in zoomImageFromThumb()
101 startScale = (float) startBounds.width() / finalBounds.width(); in zoomImageFromThumb()
/developers/samples/android/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/
DUIAnimation.java93 if ((float) finalBounds.width() / finalBounds.height() in zoomImageFromThumb()
94 > (float) startBounds.width() / startBounds.height()) { in zoomImageFromThumb()
96 float startWidth = startScale * finalBounds.width(); in zoomImageFromThumb()
97 float deltaWidth = (startWidth - startBounds.width()) / 2; in zoomImageFromThumb()
101 startScale = (float) startBounds.width() / finalBounds.width(); in zoomImageFromThumb()
/developers/samples/android/media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/utils/
DBitmapHelper.java64 public static Bitmap fetchAndRescaleBitmap(String uri, int width, int height) in fetchAndRescaleBitmap() argument
72 int scaleFactor = findScaleFactor(width, height, is); in fetchAndRescaleBitmap()
74 width, "x", height, "requested dimension"); in fetchAndRescaleBitmap()
/developers/build/prebuilts/gradle/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/utils/
DBitmapHelper.java64 public static Bitmap fetchAndRescaleBitmap(String uri, int width, int height) in fetchAndRescaleBitmap() argument
72 int scaleFactor = findScaleFactor(width, height, is); in fetchAndRescaleBitmap()
74 width, "x", height, "requested dimension"); in fetchAndRescaleBitmap()
/developers/samples/android/content/webview/PermissionRequest/Application/src/main/assets/
Dsample.css27 width: 80px;
33 width: 240px;
/developers/build/prebuilts/gradle/PermissionRequest/Application/src/main/assets/
Dsample.css27 width: 80px;
33 width: 240px;
/developers/build/prebuilts/androidtv/visual-game-controller/src/com/example/android/visualgamecontroller/
DControllerView.java281 public void surfaceChanged(SurfaceHolder holder, int format, int width, in surfaceChanged() argument
298 int width = 0; in onMeasure() local
315 width = widthSpecSize; in onMeasure()
317 width = Math.min(displayWidth, widthSpecSize); in onMeasure()
319 width = displayWidth; in onMeasure()
330 setMeasuredDimension(width, height); in onMeasure()
332 if (width > 0 && height > 0) { in onMeasure()
333 loadBitmaps(width, height); in onMeasure()
/developers/build/prebuilts/androidtv/leanback/app/src/main/java/com/example/android/leanback/
DUtils.java49 int width = size.x; in getDisplaySize() local
51 return new Point(width, height); in getDisplaySize()

123