Home
last modified time | relevance | path

Searched refs:maxWidth (Results 1 – 25 of 42) sorted by relevance

12

/packages/apps/Bluetooth/src/com/android/bluetooth/avrcpcontroller/bip/
DBipPixel.java77 public static BipPixel createResizableModified(int minWidth, int minHeight, int maxWidth, in createResizableModified() argument
79 return new BipPixel(TYPE_RESIZE_MODIFIED_ASPECT_RATIO, minWidth, minHeight, maxWidth, in createResizableModified()
86 public static BipPixel createResizableFixed(int minWidth, int maxWidth, int maxHeight) { in createResizableFixed() argument
87 int minHeight = (minWidth * maxHeight) / maxWidth; in createResizableFixed()
89 maxWidth, maxHeight); in createResizableFixed()
95 private BipPixel(int type, int minWidth, int minHeight, int maxWidth, int maxHeight) { in BipPixel() argument
96 if (isDimensionInvalid(minWidth) || isDimensionInvalid(maxWidth) in BipPixel()
104 mMaxWidth = maxWidth; in BipPixel()
115 int maxWidth = -1; in BipPixel() local
126 maxWidth = Integer.parseInt(m1.group(1)); in BipPixel()
[all …]
/packages/apps/TV/src/com/android/tv/util/images/
DImageLoader.java143 Context context, final String uriString, final int maxWidth, final int maxHeight) { in prefetchBitmap() argument
146 doLoadBitmap(context, uriString, maxWidth, maxHeight, null, AsyncTask.SERIAL_EXECUTOR); in prefetchBitmap()
155 maxWidth, in prefetchBitmap()
188 int maxWidth, in loadBitmap() argument
195 context, uriString, maxWidth, maxHeight, callback, IMAGE_THREAD_POOL_EXECUTOR); in loadBitmap()
201 int maxWidth, in doLoadBitmap() argument
209 if (bitmapInfo != null && !bitmapInfo.needToReload(maxWidth, maxHeight)) { in doLoadBitmap()
218 new LoadBitmapFromUriTask(context, imageCache, uriString, maxWidth, maxHeight)); in doLoadBitmap()
322 Context context, ImageCache imageCache, String key, int maxHeight, int maxWidth) { in LoadBitmapTask() argument
323 if (maxWidth == 0 || maxHeight == 0) { in LoadBitmapTask()
[all …]
DBitmapUtils.java60 public static Bitmap scaleBitmap(Bitmap bm, int maxWidth, int maxHeight) { in scaleBitmap() argument
61 Rect rect = calculateNewSize(bm, maxWidth, maxHeight); in scaleBitmap()
65 public static Bitmap getScaledMutableBitmap(Bitmap bm, int maxWidth, int maxHeight) { in getScaledMutableBitmap() argument
66 Bitmap scaledBitmap = scaleBitmap(bm, maxWidth, maxHeight); in getScaledMutableBitmap()
72 private static Rect calculateNewSize(Bitmap bm, int maxWidth, int maxHeight) { in calculateNewSize() argument
73 final double ratio = maxHeight / (double) maxWidth; in calculateNewSize()
77 rect.right = maxWidth; in calculateNewSize()
78 rect.bottom = Math.round((float) bm.getHeight() * maxWidth / bm.getWidth()); in calculateNewSize()
87 String id, Bitmap bm, int maxWidth, int maxHeight) { in createScaledBitmapInfo() argument
90 scaleBitmap(bm, maxWidth, maxHeight), in createScaledBitmapInfo()
[all …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/
DBipPixelTest.java31 private void testParse(String input, int pixelType, int minWidth, int minHeight, int maxWidth, in testParse() argument
37 Assert.assertEquals(maxWidth, pixel.getMaxWidth()); in testParse()
52 private void testResizableModified(int minWidth, int minHeight, int maxWidth, int maxHeight, in testResizableModified() argument
54 BipPixel pixel = BipPixel.createResizableModified(minWidth, minHeight, maxWidth, maxHeight); in testResizableModified()
58 Assert.assertEquals(maxWidth, pixel.getMaxWidth()); in testResizableModified()
63 private void testResizableFixed(int minWidth, int maxWidth, int maxHeight, in testResizableFixed() argument
65 int minHeight = (minWidth * maxHeight) / maxWidth; // spec defined in testResizableFixed()
66 BipPixel pixel = BipPixel.createResizableFixed(minWidth, maxWidth, maxHeight); in testResizableFixed()
70 Assert.assertEquals(maxWidth, pixel.getMaxWidth()); in testResizableFixed()
/packages/apps/DeskClock/src/com/android/deskclock/widget/
DEllipsizeLayout.kt96 ellipsizeView.maxWidth = Int.MAX_VALUE in onMeasure()
123 var maxWidth = ellipsizeView!!.measuredWidth - (totalLength - parentWidth) in onMeasure() variable
126 if (maxWidth < minWidth) { in onMeasure()
127 maxWidth = minWidth in onMeasure()
129 ellipsizeView.maxWidth = maxWidth in onMeasure()
/packages/apps/Dialer/java/com/android/incallui/autoresizetext/
DAutoResizeTextView.java52 private int maxWidth; field in AutoResizeTextView
150 int maxWidth = getMeasuredWidth() - getPaddingLeft() - getPaddingRight(); in adjustTextSize() local
153 if (maxWidth <= 0 || maxHeight <= 0) { in adjustTextSize()
157 this.maxWidth = maxWidth; in adjustTextSize()
158 availableSpaceRect.right = maxWidth; in adjustTextSize()
180 maxWidth, in suggestedSizeFitsInSpace()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DLogoUtils.java47 int maxWidth = (int) context.getResources().getDimension(R.dimen.max_logo_width); in getOrganisationLogo() local
50 bitmap = getBitmapPartiallyResized(logoFile.getPath(), maxWidth, maxHeight); in getOrganisationLogo()
58 resizeBitmap(bitmap, maxWidth, maxHeight)); in getOrganisationLogo()
103 static Bitmap resizeBitmap(Bitmap bitmap, int maxWidth, int maxHeight) { in resizeBitmap() argument
106 double ratio = Math.max((double) width / maxWidth, (double) height / maxHeight); in resizeBitmap()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/dashboard/
DPreferenceImageView.java50 final int maxWidth = getMaxWidth(); in onMeasure() local
51 if (maxWidth != Integer.MAX_VALUE in onMeasure()
52 && (maxWidth < widthSize || widthMode == MeasureSpec.UNSPECIFIED)) { in onMeasure()
53 widthMeasureSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST); in onMeasure()
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer/text/
DSubtitleView.java238 private boolean computeMeasurements(int maxWidth) { in computeMeasurements() argument
239 if (mHasMeasurements && maxWidth == mLastMeasuredWidth) { in computeMeasurements()
245 maxWidth -= paddingX; in computeMeasurements()
246 if (maxWidth <= 0) { in computeMeasurements()
251 mLastMeasuredWidth = maxWidth; in computeMeasurements()
254 mText, mTextPaint, maxWidth, mAlignment, mSpacingMult, mSpacingAdd, true); in computeMeasurements()
/packages/apps/LegacyCamera/src/com/android/camera/ui/
DSharePopup.java171 float maxWidth = mPreviewFrame.getWidth() - hPaddingRootView; in setOrientation() local
175 float temp = maxWidth; in setOrientation()
176 maxWidth = maxHeight; in setOrientation()
179 float actualAspect = maxWidth / maxHeight; in setOrientation()
194 params.width = Math.round(maxWidth); in setOrientation()
195 params.height = Math.round(maxWidth / desiredAspect); in setOrientation()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/
DSuggestionStripLayoutHelper.java470 private int getSuggestionWidth(final int positionInStrip, final int maxWidth) { in getSuggestionWidth() argument
473 final int availableWidth = maxWidth - paddings - dividers; in getSuggestionWidth()
569 private static float getTextScaleX(@Nullable final CharSequence text, final int maxWidth, in getTextScaleX() argument
573 if (width <= maxWidth || maxWidth <= 0) { in getTextScaleX()
576 return maxWidth / (float) width; in getTextScaleX()
581 @Nullable final CharSequence text, final int maxWidth, @Nonnull final TextPaint paint) { in getEllipsizedTextWithSettingScaleX() argument
585 final float scaleX = getTextScaleX(text, maxWidth, paint); in getEllipsizedTextWithSettingScaleX()
598 text, paint, maxWidth, TextUtils.TruncateAt.MIDDLE); in getEllipsizedTextWithSettingScaleX()
DMoreSuggestions.java57 final int maxWidth, final int minWidth, final int maxRow, final Paint paint, in layout() argument
81 (maxWidth - mDividerWidth * (numColumn - 1)) / numColumn; in layout()
191 final int maxWidth, final int minWidth, final int maxRow, in layout() argument
197 final int count = mParams.layout(suggestedWords, fromIndex, maxWidth, minWidth, maxRow, in layout()
/packages/apps/Messaging/src/com/android/messaging/ui/
DAttachmentPreviewFactory.java170 int maxWidth = imageView.getMaxWidth(); in createImagePreview() local
174 maxWidth = maxHeight = resources.getDimensionPixelSize( in createImagePreview()
177 if (maxWidth <= 0 || maxWidth == Integer.MAX_VALUE) { in createImagePreview()
178 maxWidth = ImageRequest.UNSPECIFIED_SIZE; in createImagePreview()
185 maxWidth, maxHeight)); in createImagePreview()
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/widget/
DCarUiTextViewImpl.java138 int maxWidth = layout.getWidth(); in getTruncatedText() local
141 return TextUtils.ellipsize(text, getPaint(), maxWidth, TextUtils.TruncateAt.END); in getTruncatedText()
153 index += getPaint().breakText(text, index, length, true, maxWidth, null); in getTruncatedText()
194 TextUtils.ellipsize(lastLine, getPaint(), maxWidth, TextUtils.TruncateAt.END)); in getTruncatedText()
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/
DCameraManager.java932 final int maxWidth, final int maxHeight) { in getScaleFactorForMaxAllowedSize() argument
933 if (maxWidth <= 0 || maxHeight <= 0) { in getScaleFactorForMaxAllowedSize()
940 if (width <= maxWidth && height <= maxHeight) { in getScaleFactorForMaxAllowedSize()
945 return Math.min(maxWidth * 1.0f / width, maxHeight * 1.0f / height); in getScaleFactorForMaxAllowedSize()
986 final int maxWidth = mmsConfig.getMaxImageWidth(); in chooseBestPictureSize() local
991 maxWidth, maxHeight); in chooseBestPictureSize()
1000 final int maxPixels = maxWidth * maxHeight; in chooseBestPictureSize()
1003 Collections.sort(sizes, new SizeComparator(maxWidth, maxHeight, aspectRatio, maxPixels)); in chooseBestPictureSize()
1050 public SizeComparator(final int maxWidth, final int maxHeight, in SizeComparator() argument
1052 mMaxWidth = maxWidth; in SizeComparator()
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/
DCameraManager.java729 private final int maxWidth; field in CameraManager.SizeComparator
739 final int maxWidth, in SizeComparator() argument
743 this.maxWidth = maxWidth; in SizeComparator()
756 if ((left.width <= maxWidth && left.height <= maxHeight) in compare()
757 != (right.width <= maxWidth && right.height <= maxHeight)) { in compare()
758 return left.width <= maxWidth ? PREFER_LEFT : PREFER_RIGHT; in compare()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/
DKeyPreviewView.java85 final int maxWidth = background.getIntrinsicWidth() - mBackgroundPadding.left in setTextAndScaleX() local
88 if (width <= maxWidth) { in setTextAndScaleX()
92 setTextScaleX(maxWidth / width); in setTextAndScaleX()
/packages/apps/Settings/src/com/android/settings/widget/
DMatchParentShrinkingLinearLayout.java643 int maxWidth = 0; in measureVertical() local
756 maxWidth = Math.max(maxWidth, measuredWidth); in measureVertical()
893 maxWidth = Math.max(maxWidth, measuredWidth); in measureVertical()
941 maxWidth = alternativeMaxWidth; in measureVertical()
944 maxWidth += mPaddingLeft + mPaddingRight; in measureVertical()
947 maxWidth = Math.max(maxWidth, getSuggestedMinimumWidth()); in measureVertical()
949 setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState), in measureVertical()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/
DMoreKeysKeyboard.java320 int maxWidth = minKeyWidth; in getMaxKeyWidth() local
325 maxWidth = Math.max(maxWidth, in getMaxKeyWidth()
329 return maxWidth; in getMaxKeyWidth()
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/appstyledview/
DAppStyledViewControllerImpl.java73 int maxWidth = mContext.getResources().getDimensionPixelSize( in getDialogWindowLayoutParam() local
82 .orientation == Configuration.ORIENTATION_LANDSCAPE && maxWidth < displayWidth) { in getDialogWindowLayoutParam()
91 params.width = width != 0 ? width : Math.min(displayWidth, maxWidth); in getDialogWindowLayoutParam()
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/
DMultiLineTexture.java39 String text, int maxWidth, float textSize, int color, in newInstance() argument
43 maxWidth, alignment, 1, 0, true, null, 0); in newInstance()
/packages/apps/Settings/src/com/android/settings/display/
DMessageBubbleBackground.java39 final int maxWidth = MeasureSpec.getSize(widthMeasureSpec) - widthPadding; in onMeasure() local
41 bubbleWidth = Math.min(maxWidth, in onMeasure()
/packages/apps/Messaging/src/com/android/messaging/ui/conversation/
DMessageBubbleBackground.java39 final int maxWidth = MeasureSpec.getSize(widthMeasureSpec) - widthPadding; in onMeasure() local
41 bubbleWidth = Math.min(maxWidth, in onMeasure()
/packages/apps/DocumentsUI/src/com/android/documentsui/
DDrawerController.java87 float maxWidth = activity.getResources().getDimension(R.dimen.max_drawer_width); in calculateDrawerWidth() local
88 int finalWidth = (int) ((width > maxWidth ? maxWidth : width)); in calculateDrawerWidth()
/packages/apps/Launcher3/src/com/android/launcher3/views/
DSnackbar.java84 int maxWidth = dragLayer.getWidth() - minMarginLeftRight * 2 - insets.left - insets.right; in show() local
100 if (totalContentWidth <= maxWidth) { in show()
113 params.width = maxWidth; in show()

12