Home
last modified time | relevance | path

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

123

/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()
DCamera2BasicFragment.java119 public void onSurfaceTextureAvailable(SurfaceTexture texture, int width, int height) {
120 openCamera(width, height);
124 public void onSurfaceTextureSizeChanged(SurfaceTexture texture, int width, int height) {
125 configureTransform(width, height);
355 private static Size chooseOptimalSize(Size[] choices, int width, int height, Size aspectRatio) { in chooseOptimalSize() argument
362 option.getWidth() >= width && option.getHeight() >= height) { in chooseOptimalSize()
430 private void setUpCameraOutputs(int width, int height) { in setUpCameraOutputs() argument
460 width, height, largest); in setUpCameraOutputs()
487 private void openCamera(int width, int height) { in openCamera() argument
488 setUpCameraOutputs(width, height); in openCamera()
[all …]
/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()
DCamera2BasicFragment.java119 public void onSurfaceTextureAvailable(SurfaceTexture texture, int width, int height) {
120 openCamera(width, height);
124 public void onSurfaceTextureSizeChanged(SurfaceTexture texture, int width, int height) {
125 configureTransform(width, height);
355 private static Size chooseOptimalSize(Size[] choices, int width, int height, Size aspectRatio) { in chooseOptimalSize() argument
362 option.getWidth() >= width && option.getHeight() >= height) { in chooseOptimalSize()
430 private void setUpCameraOutputs(int width, int height) { in setUpCameraOutputs() argument
460 width, height, largest); in setUpCameraOutputs()
487 private void openCamera(int width, int height) { in openCamera() argument
488 setUpCameraOutputs(width, height); in openCamera()
[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()
DCamera2VideoFragment.java104 int width, int height) {
105 openCamera(width, height);
110 int width, int height) {
111 configureTransform(width, height);
234 private static Size chooseOptimalSize(Size[] choices, int width, int height, Size aspectRatio) { in chooseOptimalSize() argument
241 option.getWidth() >= width && option.getHeight() >= height) { in chooseOptimalSize()
337 private void openCamera(int width, int height) { in openCamera() argument
355 width, height, mVideoSize); in openCamera()
363 configureTransform(width, height); in openCamera()
/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.java104 int width, int height) {
105 openCamera(width, height);
110 int width, int height) {
111 configureTransform(width, height);
234 private static Size chooseOptimalSize(Size[] choices, int width, int height, Size aspectRatio) { in chooseOptimalSize() argument
241 option.getWidth() >= width && option.getHeight() >= height) { in chooseOptimalSize()
337 private void openCamera(int width, int height) { in openCamera() argument
355 width, height, mVideoSize); in openCamera()
363 configureTransform(width, height); in openCamera()
/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/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/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/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/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/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/samples/android/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/
DTiltWatchFaceService.java220 public void onGlSurfaceCreated(int width, int height) { in onGlSurfaceCreated() argument
222 Log.d(TAG, "onGlSurfaceCreated: " + width + " x " + height); in onGlSurfaceCreated()
224 super.onGlSurfaceCreated(width, height); in onGlSurfaceCreated()
227 final float aspectRatio = (float) width / height; in onGlSurfaceCreated()
254 float width, float length, float[] color) { in createHand() argument
259 -width / 2, 0, 0, // bottom left in createHand()
260 width / 2, 0, 0 // bottom right in createHand()
329 private float[] getTickTriangleCoords(float width, float length, int angleDegrees) { in getTickTriangleCoords() argument
334 width / 2, length + 1, 0, // bottom left in getTickTriangleCoords()
335 -width / 2, length + 1, 0 // bottom right in getTickTriangleCoords()
DSweepWatchFaceService.java180 int width = bounds.width(); in onDraw() local
185 || mBackgroundScaledBitmap.getWidth() != width in onDraw()
188 width, height, true /* filter */); in onDraw()
195 float centerX = width / 2f; in onDraw()
/developers/build/prebuilts/gradle/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/
DTiltWatchFaceService.java220 public void onGlSurfaceCreated(int width, int height) { in onGlSurfaceCreated() argument
222 Log.d(TAG, "onGlSurfaceCreated: " + width + " x " + height); in onGlSurfaceCreated()
224 super.onGlSurfaceCreated(width, height); in onGlSurfaceCreated()
227 final float aspectRatio = (float) width / height; in onGlSurfaceCreated()
254 float width, float length, float[] color) { in createHand() argument
259 -width / 2, 0, 0, // bottom left in createHand()
260 width / 2, 0, 0 // bottom right in createHand()
329 private float[] getTickTriangleCoords(float width, float length, int angleDegrees) { in getTickTriangleCoords() argument
334 width / 2, length + 1, 0, // bottom left in getTickTriangleCoords()
335 -width / 2, length + 1, 0 // bottom right in getTickTriangleCoords()
DSweepWatchFaceService.java180 int width = bounds.width(); in onDraw() local
185 || mBackgroundScaledBitmap.getWidth() != width in onDraw()
188 width, height, true /* filter */); in onDraw()
195 float centerX = width / 2f; in onDraw()
/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/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()
/developers/build/prebuilts/gradle/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/utils/
DBitmapHelper.java60 public static final Bitmap fetchAndRescaleBitmap(String uri, int width, int height) in fetchAndRescaleBitmap() argument
67 int scaleFactor = findScaleFactor(width, height, inputStream); in fetchAndRescaleBitmap()
/developers/samples/android/media/MediaBrowserService/Application/src/main/java/com/example/android/mediabrowserservice/utils/
DBitmapHelper.java60 public static final Bitmap fetchAndRescaleBitmap(String uri, int width, int height) in fetchAndRescaleBitmap() argument
67 int scaleFactor = findScaleFactor(width, height, inputStream); in fetchAndRescaleBitmap()

123