Home
last modified time | relevance | path

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

12

/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/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.java139 public void onSurfaceTextureAvailable(SurfaceTexture texture, int width, int height) {
140 openCamera(width, height);
144 public void onSurfaceTextureSizeChanged(SurfaceTexture texture, int width, int height) {
145 configureTransform(width, height);
491 private void setUpCameraOutputs(int width, int height) { in setUpCameraOutputs() argument
545 int rotatedPreviewWidth = width; in setUpCameraOutputs()
552 rotatedPreviewHeight = width; in setUpCameraOutputs()
602 private void openCamera(int width, int height) { in openCamera() argument
608 setUpCameraOutputs(width, height); in openCamera()
609 configureTransform(width, height); in openCamera()
/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.java128 int width, int height) {
129 openCamera(width, height);
134 int width, int height) {
135 configureTransform(width, height);
254 private static Size chooseOptimalSize(Size[] choices, int width, int height, Size aspectRatio) { in chooseOptimalSize() argument
261 option.getWidth() >= width && option.getHeight() >= height) { in chooseOptimalSize()
416 private void openCamera(int width, int height) { in openCamera() argument
443 width, height, mVideoSize); in openCamera()
451 configureTransform(width, height); in openCamera()
/developers/samples/android/media/Camera2Video/kotlinApp/Application/src/main/java/com/example/android/camera2video/
DAutoFitTextureView.kt44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio()
45 if (width < 0 || height < 0) { in setAspectRatio()
48 ratioWidth = width in setAspectRatio()
55 val width = View.MeasureSpec.getSize(widthMeasureSpec) in onMeasure() constant
58 setMeasuredDimension(width, height) in onMeasure()
60 if (width < ((height * ratioWidth) / ratioHeight)) { in onMeasure()
61 setMeasuredDimension(width, (width * ratioHeight) / ratioWidth) in onMeasure()
DCamera2VideoFragment.kt88 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 …]
DCompareSizesByArea.kt29 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/
DAutoFitTextureView.kt44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio()
45 if (width < 0 || height < 0) { in setAspectRatio()
48 ratioWidth = width in setAspectRatio()
55 val width = View.MeasureSpec.getSize(widthMeasureSpec) in onMeasure() constant
58 setMeasuredDimension(width, height) in onMeasure()
60 if (width < height * ratioWidth / ratioHeight) { in onMeasure()
61 setMeasuredDimension(width, width * ratioHeight / ratioWidth) in onMeasure()
DCamera2BasicFragment.kt69 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 …]
DCompareSizesByArea.kt15 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/
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/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/
DFixedAspectSurfaceView.java87 int width = MeasureSpec.getSize(widthMeasureSpec); 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()
141 width = View.resolveSizeAndState(width, widthMeasureSpec, 0); in onMeasure()
145 setMeasuredDimension(width, height); in onMeasure()
/developers/samples/android/ui/fonts/DownloadableFonts/kotlinApp/app/src/main/kotlin/com/example/android/downloadablefonts/
DQueryBuilder.kt23 val width: Float? = null, constant in com.example.android.downloadablefonts.QueryBuilder
29 if (weight == null && width == null && italic == null && besteffort == null) { in build()
35 width?.let { builder.append("&width=").append(width) } in build()
/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/watchface/
DOpenGLWatchFaceService.java225 public void onGlSurfaceCreated(int width, int height) { in onGlSurfaceCreated() argument
227 Log.d(TAG, "onGlSurfaceCreated: " + width + " x " + height); in onGlSurfaceCreated()
229 super.onGlSurfaceCreated(width, height); in onGlSurfaceCreated()
232 final float aspectRatio = (float) width / height; in onGlSurfaceCreated()
259 float width, float length, float[] color) { in createHand() argument
264 -width / 2, 0, 0, // bottom left in createHand()
265 width / 2, 0, 0 // bottom right in createHand()
334 private float[] getTickTriangleCoords(float width, float length, int angleDegrees) { in getTickTriangleCoords() argument
339 width / 2, length + 1, 0, // bottom left in getTickTriangleCoords()
340 -width / 2, length + 1, 0 // bottom right in getTickTriangleCoords()
DAnalogComplicationWatchFaceService.java518 public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) { in onSurfaceChanged() argument
519 super.onSurfaceChanged(holder, format, width, height); in onSurfaceChanged()
526 mCenterX = width / 2f; in onSurfaceChanged()
546 int sizeOfComplication = width / 4; in onSurfaceChanged()
547 int midpointOfScreen = width / 2; in onSurfaceChanged()
578 new Rect(0, 0, width, height); in onSurfaceChanged()
600 int width = canvas.getWidth(); in drawUnreadNotificationIcon() local
603 canvas.drawCircle(width / 2, height - 40, 10, mTickAndCirclePaint); in drawUnreadNotificationIcon()
610 canvas.drawCircle(width / 2, height - 40, 4, mSecondAndHighlightPaint); in drawUnreadNotificationIcon()
/developers/samples/android/ui/fonts/DownloadableFonts/app/src/main/java/com/example/android/downloadablefonts/
DQueryBuilder.java51 QueryBuilder withWidth(float width) { in withWidth() argument
52 if (width <= Constants.WIDTH_MIN) { in withWidth()
55 mWidth = width; in withWidth()
/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/PictureInPicture/kotlinApp/app/src/main/java/com/example/android/pictureinpicture/widget/
DMovieView.kt169 width: Int, height: Int) { in <lambda>()
186 val width = View.MeasureSpec.getSize(widthMeasureSpec) in <lambda>() constant
194 View.MeasureSpec.makeMeasureSpec((width * aspectRatio).toInt(), in <lambda>()
202 View.MeasureSpec.makeMeasureSpec((width * 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/content/webview/PermissionRequest/Application/src/main/assets/
Dsample.css27 width: 80px;
33 width: 240px;
/developers/samples/android/media/PictureInPicture/app/src/main/java/com/example/android/pictureinpicture/widget/
DMovieView.java190 SurfaceHolder holder, int format, int width, int height) { in MovieView()
211 final int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
220 (int) (width * aspectRatio), MeasureSpec.EXACTLY)); in onMeasure()
231 (int) (width * aspectRatio), MeasureSpec.EXACTLY)); in onMeasure()
234 final float viewRatio = (float) height / width; in onMeasure()
236 int padding = (int) ((width - height / aspectRatio) / 2); in onMeasure()
239 int padding = (int) ((height - width * aspectRatio) / 2); in onMeasure()
/developers/samples/android/ui/text/RoundedBackground-Kotlin/
DREADME.md8 <img src="../screenshots/single.png" width="30%" />
12 <img src="../screenshots/multi.png" width="30%" />
16 <img src="../screenshots/rtl.png" width="30%" />
27 <img src="../screenshots/lines.png" width="30%" />
62 <img src="../screenshots/rounded_bg.png" width="30%" />
/developers/samples/android/ui/graphics/DisplayingBitmaps/Application/src/main/java/com/example/android/displayingbitmaps/ui/
DImageDetailActivity.java66 final int width = displayMetrics.widthPixels; in onCreate() local
73 final int longest = (height > width ? height : width) / 2; in onCreate()

12