/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | SmartReplyViewTest.java | 17 import static android.view.View.MeasureSpec; 86 private static final int WIDTH_SPEC = MeasureSpec.makeMeasureSpec(500, MeasureSpec.EXACTLY); 87 private static final int HEIGHT_SPEC = MeasureSpec.makeMeasureSpec(400, MeasureSpec.AT_MOST); 279 expectedView.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); in testMeasure_shortChoices() 282 mView.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); in testMeasure_shortChoices() 296 expectedView.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); in testLayout_shortChoices() 301 mView.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); in testLayout_shortChoices() 316 expectedView.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); in testMeasure_choiceWithTwoLines() 319 mView.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); in testMeasure_choiceWithTwoLines() 333 expectedView.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); in testLayout_choiceWithTwoLines() [all …]
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | PreferenceImageView.java | 49 final int widthMode = MeasureSpec.getMode(widthMeasureSpec); in onMeasure() 50 if (widthMode == MeasureSpec.AT_MOST || widthMode == MeasureSpec.UNSPECIFIED) { in onMeasure() 51 final int widthSize = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() 54 && (maxWidth < widthSize || widthMode == MeasureSpec.UNSPECIFIED)) { in onMeasure() 55 widthMeasureSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST); in onMeasure() 59 final int heightMode = MeasureSpec.getMode(heightMeasureSpec); in onMeasure() 60 if (heightMode == MeasureSpec.AT_MOST || heightMode == MeasureSpec.UNSPECIFIED) { in onMeasure() 61 final int heightSize = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() 64 && (maxHeight < heightSize || heightMode == MeasureSpec.UNSPECIFIED)) { in onMeasure() 65 heightMeasureSpec = MeasureSpec.makeMeasureSpec(maxHeight, MeasureSpec.AT_MOST); in onMeasure()
|
D | AlertDialogLayout.java | 111 final int heightMode = MeasureSpec.getMode(heightMeasureSpec); in tryOnMeasure() 112 final int heightSize = MeasureSpec.getSize(heightMeasureSpec); in tryOnMeasure() 113 final int widthMode = MeasureSpec.getMode(widthMeasureSpec); in tryOnMeasure() 119 topPanel.measure(widthMeasureSpec, MeasureSpec.UNSPECIFIED); in tryOnMeasure() 128 buttonPanel.measure(widthMeasureSpec, MeasureSpec.UNSPECIFIED); in tryOnMeasure() 139 if (heightMode == MeasureSpec.UNSPECIFIED) { in tryOnMeasure() 140 childHeightSpec = MeasureSpec.UNSPECIFIED; in tryOnMeasure() 142 childHeightSpec = MeasureSpec.makeMeasureSpec( in tryOnMeasure() 167 final int childHeightSpec = MeasureSpec.makeMeasureSpec( in tryOnMeasure() 168 buttonHeight, MeasureSpec.EXACTLY); in tryOnMeasure() [all …]
|
D | DialogViewAnimator.java | 44 MeasureSpec.getMode(widthMeasureSpec) != MeasureSpec.EXACTLY || in onMeasure() 45 MeasureSpec.getMode(heightMeasureSpec) != MeasureSpec.EXACTLY; in onMeasure() 114 childWidthMeasureSpec = MeasureSpec.makeMeasureSpec( in onMeasure() 117 MeasureSpec.EXACTLY); in onMeasure() 126 childHeightMeasureSpec = MeasureSpec.makeMeasureSpec( in onMeasure() 129 MeasureSpec.EXACTLY); in onMeasure()
|
D | ActionBarContextView.java | 303 final int widthMode = MeasureSpec.getMode(widthMeasureSpec); in onMeasure() 304 if (widthMode != MeasureSpec.EXACTLY) { in onMeasure() 309 final int heightMode = MeasureSpec.getMode(heightMeasureSpec); in onMeasure() 310 if (heightMode == MeasureSpec.UNSPECIFIED) { in onMeasure() 315 final int contentWidth = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() 318 mContentHeight : MeasureSpec.getSize(heightMeasureSpec); in onMeasure() 323 final int childSpecHeight = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST); in onMeasure() 338 final int titleWidthSpec = MeasureSpec.makeSafeMeasureSpec(contentWidth, in onMeasure() 339 MeasureSpec.UNSPECIFIED); in onMeasure() 355 MeasureSpec.EXACTLY : MeasureSpec.AT_MOST; in onMeasure() [all …]
|
/frameworks/base/tests/WindowAnimationJank/src/android/windowanimationjank/ |
D | FlowLayout.java | 38 MeasureSpec.getSize(widthMeasureSpec) - getPaddingLeft() -getPaddingRight(); in onMeasure() 40 MeasureSpec.getSize(heightMeasureSpec) - getPaddingTop() - getPaddingBottom(); in onMeasure() 48 if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.AT_MOST) { in onMeasure() 49 childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST); in onMeasure() 51 childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); in onMeasure() 57 child.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), in onMeasure() 72 if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.UNSPECIFIED) { in onMeasure() 74 } else if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.AT_MOST) { in onMeasure()
|
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/view/ |
D | FillContentLayoutTest.java | 23 import android.view.View.MeasureSpec; 44 MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), in testMeasureMinSize() 45 MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); in testMeasureMinSize() 63 MeasureSpec.makeMeasureSpec(300, MeasureSpec.EXACTLY), in testMeasureChildIsSmallerThanMaxSize() 64 MeasureSpec.makeMeasureSpec(300, MeasureSpec.EXACTLY)); in testMeasureChildIsSmallerThanMaxSize() 82 MeasureSpec.makeMeasureSpec(88, MeasureSpec.EXACTLY), in testMeasureChildIsSmallerThanParent() 83 MeasureSpec.makeMeasureSpec(88, MeasureSpec.EXACTLY)); in testMeasureChildIsSmallerThanParent()
|
/frameworks/rs/tests/java_api/RsCameraDemo/src/com/android/example/rscamera/ |
D | FixedAspectSurfaceView.java | 88 int widthMode = MeasureSpec.getMode(widthMeasureSpec); in onMeasure() 89 int heightMode = MeasureSpec.getMode(heightMeasureSpec); in onMeasure() 90 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() 91 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() 102 if (widthMode == MeasureSpec.EXACTLY && heightMode == MeasureSpec.EXACTLY) { in onMeasure() 104 } else if (widthMode == MeasureSpec.EXACTLY) { in onMeasure() 107 } else if (heightMode == MeasureSpec.EXACTLY) { in onMeasure() 110 } else if (widthMode == MeasureSpec.AT_MOST && heightMode == MeasureSpec.AT_MOST) { in onMeasure() 122 } else if (widthMode == MeasureSpec.AT_MOST) { in onMeasure() 125 } else if (heightMode == MeasureSpec.AT_MOST) { in onMeasure()
|
/frameworks/rs/tests/java_api/CannyLive/src/com/android/example/cannylive/ |
D | FixedAspectSurfaceView.java | 88 int widthMode = MeasureSpec.getMode(widthMeasureSpec); in onMeasure() 89 int heightMode = MeasureSpec.getMode(heightMeasureSpec); in onMeasure() 90 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() 91 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() 102 if (widthMode == MeasureSpec.EXACTLY && heightMode == MeasureSpec.EXACTLY) { in onMeasure() 104 } else if (widthMode == MeasureSpec.EXACTLY) { in onMeasure() 107 } else if (heightMode == MeasureSpec.EXACTLY) { in onMeasure() 110 } else if (widthMode == MeasureSpec.AT_MOST && heightMode == MeasureSpec.AT_MOST) { in onMeasure() 122 } else if (widthMode == MeasureSpec.AT_MOST) { in onMeasure() 125 } else if (heightMode == MeasureSpec.AT_MOST) { in onMeasure()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/ |
D | QSHeaderInfoLayout.kt | 76 MeasureSpec.makeMeasureSpec( in onMeasure() 77 MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.AT_MOST), in onMeasure() 79 val width = MeasureSpec.getSize(widthMeasureSpec) in onMeasure() 87 val availableSpace = MeasureSpec.getSize(width) - separatorWidth in onMeasure() 91 MeasureSpec.makeMeasureSpec( in onMeasure() 93 MeasureSpec.AT_MOST), in onMeasure() 97 MeasureSpec.makeMeasureSpec( in onMeasure() 99 MeasureSpec.AT_MOST), in onMeasure() 104 MeasureSpec.makeMeasureSpec(availableSpace / 2, MeasureSpec.AT_MOST), in onMeasure() 108 MeasureSpec.makeMeasureSpec(availableSpace / 2, MeasureSpec.AT_MOST), in onMeasure()
|
D | PseudoGridView.java | 64 if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED) { in onMeasure() 67 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() 70 int childWidthSpec = MeasureSpec.makeMeasureSpec(childWidth, MeasureSpec.EXACTLY); in onMeasure() 71 int childHeightSpec = MeasureSpec.UNSPECIFIED; in onMeasure() 84 int maxHeightSpec = MeasureSpec.makeMeasureSpec(maxHeight, MeasureSpec.EXACTLY); in onMeasure()
|
/frameworks/base/apct-tests/perftests/core/src/android/widget/ |
D | TextViewPrecomputedTextPerfTest.java | 32 import android.view.View.MeasureSpec; 247 int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST); in testOnMeasure_RandomText() 248 int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); in testOnMeasure_RandomText() 267 int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST); in testOnMeasure_RandomText_Selectable() 268 int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); in testOnMeasure_RandomText_Selectable() 288 int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST); in testOnMeasure_PrecomputedText() 289 int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); in testOnMeasure_PrecomputedText() 311 int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST); in testOnMeasure_PrecomputedText_Selectable() 312 int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); in testOnMeasure_PrecomputedText_Selectable() 335 int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST); in testOnDraw_RandomText() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | KeyboardShortcutKeysLayout.java | 46 int width = MeasureSpec.getSize(widthMeasureSpec) - getPaddingLeft() - getPaddingRight(); in onMeasure() 48 int height = MeasureSpec.getSize(heightMeasureSpec) - getPaddingTop() - getPaddingBottom(); in onMeasure() 54 if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.AT_MOST) { in onMeasure() 55 childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST); in onMeasure() 57 childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); in onMeasure() 64 child.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), in onMeasure() 79 if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.UNSPECIFIED) { in onMeasure() 81 } else if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.AT_MOST) { in onMeasure()
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/view/ |
D | IntrinsicSizeFrameLayout.java | 79 final int mode = MeasureSpec.getMode(measureSpec); in getIntrinsicMeasureSpec() 80 final int size = MeasureSpec.getSize(measureSpec); in getIntrinsicMeasureSpec() 81 if (mode == MeasureSpec.UNSPECIFIED) { in getIntrinsicMeasureSpec() 83 return MeasureSpec.makeMeasureSpec(intrinsicHeight, MeasureSpec.EXACTLY); in getIntrinsicMeasureSpec() 84 } else if (mode == MeasureSpec.AT_MOST) { in getIntrinsicMeasureSpec() 87 return MeasureSpec.makeMeasureSpec(Math.min(size, intrinsicHeight), MeasureSpec.EXACTLY); in getIntrinsicMeasureSpec()
|
D | FillContentLayout.java | 111 return MeasureSpec.makeMeasureSpec(childDimension, MeasureSpec.EXACTLY); in getMaxSizeMeasureSpec() 114 return MeasureSpec.makeMeasureSpec(size, MeasureSpec.EXACTLY); in getMaxSizeMeasureSpec() 118 return MeasureSpec.makeMeasureSpec(size, MeasureSpec.AT_MOST); in getMaxSizeMeasureSpec()
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
D | LabelView.java | 132 int specMode = MeasureSpec.getMode(measureSpec); in measureWidth() 133 int specSize = MeasureSpec.getSize(measureSpec); in measureWidth() 135 if (specMode == MeasureSpec.EXACTLY) { in measureWidth() 142 if (specMode == MeasureSpec.AT_MOST) { in measureWidth() 158 int specMode = MeasureSpec.getMode(measureSpec); in measureHeight() 159 int specSize = MeasureSpec.getSize(measureSpec); in measureHeight() 162 if (specMode == MeasureSpec.EXACTLY) { in measureHeight() 169 if (specMode == MeasureSpec.AT_MOST) { in measureHeight()
|
/frameworks/base/packages/SystemUI/src/com/android/keyguard/ |
D | KeyguardSecurityViewFlipper.java | 200 final int widthMode = MeasureSpec.getMode(widthSpec); in onMeasure() 201 final int heightMode = MeasureSpec.getMode(heightSpec); in onMeasure() 202 if (DEBUG && widthMode != MeasureSpec.AT_MOST) { in onMeasure() 203 Log.w(TAG, "onMeasure: widthSpec " + MeasureSpec.toString(widthSpec) + in onMeasure() 206 if (DEBUG && heightMode != MeasureSpec.AT_MOST) { in onMeasure() 207 Log.w(TAG, "onMeasure: heightSpec " + MeasureSpec.toString(heightSpec) + in onMeasure() 211 final int widthSize = MeasureSpec.getSize(widthSpec); in onMeasure() 212 final int heightSize = MeasureSpec.getSize(heightSpec); in onMeasure() 233 int width = widthMode == MeasureSpec.EXACTLY ? widthSize : 0; in onMeasure() 234 int height = heightMode == MeasureSpec.EXACTLY ? heightSize : 0; in onMeasure() [all …]
|
/frameworks/base/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/ |
D | FixedSizeFrameLayout.java | 53 measureContents(MeasureSpec.getSize(widthMeasureSpec), in onMeasure() 54 MeasureSpec.getSize(heightMeasureSpec)); in onMeasure() 82 super.onMeasure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), in measureContents() 83 MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST)); in measureContents()
|
/frameworks/layoutlib/studio-custom-widgets/src/com/android/tools/idea/editors/theme/widgets/ |
D | ThemePreviewLayout.java | 100 int wSize = MeasureSpec.getSize(widthMeasureSpec) - mPaddingLeft - mPaddingRight; in onMeasure() 105 int childWidthSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); in onMeasure() 106 int childHeightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); in onMeasure() 140 childWidthSpec = MeasureSpec.makeMeasureSpec(itemWidth, MeasureSpec.EXACTLY); in onMeasure() 141 childHeightSpec = MeasureSpec.makeMeasureSpec(itemHeight, MeasureSpec.EXACTLY); in onMeasure()
|
/frameworks/base/core/java/android/widget/ |
D | Space.java | 77 int specMode = MeasureSpec.getMode(measureSpec); in getDefaultSize2() 78 int specSize = MeasureSpec.getSize(measureSpec); in getDefaultSize2() 81 case MeasureSpec.UNSPECIFIED: in getDefaultSize2() 84 case MeasureSpec.AT_MOST: in getDefaultSize2() 87 case MeasureSpec.EXACTLY: in getDefaultSize2()
|
D | DayPickerViewPager.java | 60 MeasureSpec.getMode(widthMeasureSpec) != MeasureSpec.EXACTLY || in onMeasure() 61 MeasureSpec.getMode(heightMeasureSpec) != MeasureSpec.EXACTLY; in onMeasure() 113 childWidthMeasureSpec = MeasureSpec.makeMeasureSpec( in onMeasure() 115 MeasureSpec.EXACTLY); in onMeasure() 123 childHeightMeasureSpec = MeasureSpec.makeMeasureSpec( in onMeasure() 125 MeasureSpec.EXACTLY); in onMeasure()
|
D | SlidingDrawer.java | 283 int widthSpecMode = MeasureSpec.getMode(widthMeasureSpec); in onMeasure() 284 int widthSpecSize = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() 286 int heightSpecMode = MeasureSpec.getMode(heightMeasureSpec); in onMeasure() 287 int heightSpecSize = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() 289 if (widthSpecMode == MeasureSpec.UNSPECIFIED || heightSpecMode == MeasureSpec.UNSPECIFIED) { in onMeasure() 298 mContent.measure(MeasureSpec.makeMeasureSpec(widthSpecSize, MeasureSpec.EXACTLY), in onMeasure() 299 MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)); in onMeasure() 302 mContent.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), in onMeasure() 303 MeasureSpec.makeMeasureSpec(heightSpecSize, MeasureSpec.EXACTLY)); in onMeasure() 670 content.measure(MeasureSpec.makeMeasureSpec(mRight - mLeft, MeasureSpec.EXACTLY), in prepareContent() [all …]
|
D | LinearLayout.java | 783 final int widthMode = MeasureSpec.getMode(widthMeasureSpec); in measureVertical() 784 final int heightMode = MeasureSpec.getMode(heightMeasureSpec); in measureVertical() 820 if (heightMode == MeasureSpec.EXACTLY && useExcessSpace) { in measureVertical() 882 if (widthMode != MeasureSpec.EXACTLY && lp.width == LayoutParams.MATCH_PARENT) { in measureVertical() 917 (heightMode == MeasureSpec.AT_MOST || heightMode == MeasureSpec.UNSPECIFIED)) { in measureVertical() 977 if (mUseLargestChild && heightMode != MeasureSpec.EXACTLY) { in measureVertical() 980 || heightMode == MeasureSpec.EXACTLY)) { in measureVertical() 990 final int childHeightMeasureSpec = MeasureSpec.makeMeasureSpec( in measureVertical() 991 Math.max(0, childHeight), MeasureSpec.EXACTLY); in measureVertical() 1006 boolean matchWidthLocally = widthMode != MeasureSpec.EXACTLY && in measureVertical() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ |
D | ExpandableView.java | 70 final int givenSize = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() 73 int heightMode = MeasureSpec.getMode(heightMeasureSpec); in onMeasure() 74 if (heightMode != MeasureSpec.UNSPECIFIED && givenSize != 0) { in onMeasure() 77 int newHeightSpec = MeasureSpec.makeMeasureSpec(ownMaxHeight, MeasureSpec.AT_MOST); in onMeasure() 91 ? MeasureSpec.makeMeasureSpec(ownMaxHeight, MeasureSpec.EXACTLY) in onMeasure() 92 : MeasureSpec.makeMeasureSpec(layoutParams.height, MeasureSpec.EXACTLY); in onMeasure() 103 int ownHeight = heightMode == MeasureSpec.EXACTLY in onMeasure() 105 newHeightSpec = MeasureSpec.makeMeasureSpec(ownHeight, MeasureSpec.EXACTLY); in onMeasure() 112 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/widget/ |
D | ImageFloatingTextViewTest.java | 23 import android.view.View.MeasureSpec; 119 int heightMeasureSpec = MeasureSpec.makeMeasureSpec(500, MeasureSpec.AT_MOST); in parametrizedTest() 120 int widthMeasureSpec = MeasureSpec.makeMeasureSpec(500, MeasureSpec.EXACTLY); in parametrizedTest()
|