Home
last modified time | relevance | path

Searched refs:layoutParams (Results 1 – 25 of 27) sorted by relevance

12

/cts/tests/tests/widget/src/android/widget/cts/
DRelativeLayout_LayoutParamsTest.java63 RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(200, 300); in testConstructor() local
64 assertEquals(200, layoutParams.width); in testConstructor()
65 assertEquals(300, layoutParams.height); in testConstructor()
67 RelativeLayout.LayoutParams tempLayoutParams = layoutParams; in testConstructor()
68 layoutParams = new RelativeLayout.LayoutParams(tempLayoutParams); in testConstructor()
69 assertEquals(200, layoutParams.width); in testConstructor()
70 assertEquals(300, layoutParams.height); in testConstructor()
73 layoutParams = new RelativeLayout.LayoutParams(tempViewGroupLayoutParams); in testConstructor()
74 assertEquals(300, layoutParams.width); in testConstructor()
75 assertEquals(400, layoutParams.height); in testConstructor()
[all …]
DTableRow_LayoutParamsTest.java67 TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(200, 300); in testConstructor() local
68 assertEquals(200, layoutParams.width); in testConstructor()
69 assertEquals(300, layoutParams.height); in testConstructor()
70 assertEquals(-1, layoutParams.column); in testConstructor()
71 assertEquals(1, layoutParams.span); in testConstructor()
72 ViewGroup.LayoutParams oldParams = layoutParams; in testConstructor()
74 layoutParams = new TableRow.LayoutParams(200, 300, 1.2f); in testConstructor()
75 assertEquals(200, layoutParams.width); in testConstructor()
76 assertEquals(300, layoutParams.height); in testConstructor()
77 assertEquals(1.2f, layoutParams.weight, 0.0f); in testConstructor()
[all …]
DAbsListView_LayoutParamsTest.java57 AbsListView.LayoutParams layoutParams; in testConstructors() local
59 layoutParams = new AbsListView.LayoutParams(mContext, mAttributeSet); in testConstructors()
60 assertEquals(TEST_WIDTH, layoutParams.width); in testConstructors()
61 assertEquals(TEST_HEIGHT, layoutParams.height); in testConstructors()
63 layoutParams = new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, in testConstructors()
65 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructors()
66 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.height); in testConstructors()
68 layoutParams = new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, in testConstructors()
70 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructors()
71 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.height); in testConstructors()
[all …]
DTableLayout_LayoutParamsTest.java56 TableLayout.LayoutParams layoutParams = new TableLayout.LayoutParams(); in testConstructor() local
57 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
58 assertEquals(TableLayout.LayoutParams.WRAP_CONTENT, layoutParams.height); in testConstructor()
61 layoutParams = new TableLayout.LayoutParams(mContext, null); in testConstructor()
62 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
63 assertEquals(TableLayout.LayoutParams.WRAP_CONTENT, layoutParams.height); in testConstructor()
66 layoutParams = new TableLayout.LayoutParams(200, 300); in testConstructor()
67 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
68 assertEquals(300, layoutParams.height); in testConstructor()
71 layoutParams = new TableLayout.LayoutParams(250, 350, 1.2f); in testConstructor()
[all …]
DAbsoluteLayout_LayoutParamsTest.java60 LayoutParams layoutParams; in testConstructor() local
62 layoutParams = new AbsoluteLayout.LayoutParams(1, 2, 3, 4); in testConstructor()
63 assertEquals(1, layoutParams.width); in testConstructor()
64 assertEquals(2, layoutParams.height); in testConstructor()
65 assertEquals(3, layoutParams.x); in testConstructor()
66 assertEquals(4, layoutParams.y); in testConstructor()
68 LayoutParams params = new AbsoluteLayout.LayoutParams(layoutParams); in testConstructor()
79 LayoutParams layoutParams = new AbsoluteLayout.LayoutParams(1, 2, 3, 4); in testDebug() local
80 assertNotNull(layoutParams.debug("test: ")); in testDebug()
DRadioGroupTest.java303 RadioGroup.LayoutParams layoutParams = in testGenerateLayoutParams() local
305 assertNotNull(layoutParams); in testGenerateLayoutParams()
307 assertEquals(0.0, layoutParams.weight, 0); in testGenerateLayoutParams()
308 assertEquals(-1, layoutParams.gravity); in testGenerateLayoutParams()
309 assertEquals(0, layoutParams.leftMargin); in testGenerateLayoutParams()
310 assertEquals(0, layoutParams.topMargin); in testGenerateLayoutParams()
311 assertEquals(0, layoutParams.rightMargin); in testGenerateLayoutParams()
312 assertEquals(0, layoutParams.bottomMargin); in testGenerateLayoutParams()
313 assertEquals(LayoutParams.WRAP_CONTENT, layoutParams.width); in testGenerateLayoutParams()
314 assertEquals(LayoutParams.WRAP_CONTENT, layoutParams.height); in testGenerateLayoutParams()
[all …]
DTableRowTest.java178 LinearLayout.LayoutParams layoutParams = mockTableRow.generateDefaultLayoutParams(); in testGenerateDefaultLayoutParams() local
179 assertNotNull(layoutParams); in testGenerateDefaultLayoutParams()
180 assertTrue(layoutParams instanceof TableRow.LayoutParams); in testGenerateDefaultLayoutParams()
187 LinearLayout.LayoutParams layoutParams = mockTableRow.generateLayoutParams( in testGenerateLayoutParamsFromLayoutParams() local
189 assertNotNull(layoutParams); in testGenerateLayoutParamsFromLayoutParams()
190 assertEquals(200, layoutParams.width); in testGenerateLayoutParamsFromLayoutParams()
191 assertEquals(300, layoutParams.height); in testGenerateLayoutParamsFromLayoutParams()
192 assertTrue(layoutParams instanceof TableRow.LayoutParams); in testGenerateLayoutParamsFromLayoutParams()
DLinearLayout_LayoutParamsTest.java68 LayoutParams layoutParams = new LayoutParams(200, 480); in testConstructor() local
69 linearLayoutParams = new LinearLayout.LayoutParams(layoutParams); in testConstructor()
94 LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(320, 240); in testDebug() local
95 assertNotNull(layoutParams.debug("test: ")); in testDebug()
DRadioGroup_LayoutParamsTest.java144 MockLayoutParams layoutParams = new MockLayoutParams(mContext, null); in testSetBaseAttributes() local
146 assertEquals(RadioGroup.LayoutParams.WRAP_CONTENT, layoutParams.width); in testSetBaseAttributes()
147 assertEquals(RadioGroup.LayoutParams.WRAP_CONTENT, layoutParams.height); in testSetBaseAttributes()
152 layoutParams.setBaseAttributes(a, in testSetBaseAttributes()
156 assertEquals(RadioGroup.LayoutParams.MATCH_PARENT, layoutParams.width); in testSetBaseAttributes()
157 assertEquals(RadioGroup.LayoutParams.MATCH_PARENT, layoutParams.height); in testSetBaseAttributes()
DRelativeLayoutTest.java263 LayoutParams layoutParams = relativeLayout.generateLayoutParams(parser); in testGenerateLayoutParams1() local
264 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.width); in testGenerateLayoutParams1()
265 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.height); in testGenerateLayoutParams1()
275 RelativeLayout.LayoutParams layoutParams = in testGenerateLayoutParams2() local
277 assertEquals(200, layoutParams.width); in testGenerateLayoutParams2()
278 assertEquals(300, layoutParams.height); in testGenerateLayoutParams2()
291 ViewGroup.LayoutParams layoutParams = myRelativeLayout.generateDefaultLayoutParams(); in testGenerateDefaultLayoutParams() local
292 assertTrue(layoutParams instanceof RelativeLayout.LayoutParams); in testGenerateDefaultLayoutParams()
293 assertEquals(ViewGroup.LayoutParams.WRAP_CONTENT, layoutParams.width); in testGenerateDefaultLayoutParams()
294 assertEquals(ViewGroup.LayoutParams.WRAP_CONTENT, layoutParams.height); in testGenerateDefaultLayoutParams()
DGalleryTest.java166 LayoutParams layoutParams = gallery.generateLayoutParams(lp); in testGenerateLayoutParams() local
167 assertEquals(width, layoutParams.width); in testGenerateLayoutParams()
168 assertEquals(height, layoutParams.height); in testGenerateLayoutParams()
175 layoutParams = mGallery.generateLayoutParams(attrs); in testGenerateLayoutParams()
176 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.width); in testGenerateLayoutParams()
177 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.height); in testGenerateLayoutParams()
DTableLayoutTest.java589 LinearLayout.LayoutParams layoutParams = mTableCustomEmpty.generateDefaultLayoutParams(); in testGenerateDefaultLayoutParams() local
590 assertNotNull(layoutParams); in testGenerateDefaultLayoutParams()
591 assertTrue(layoutParams instanceof TableLayout.LayoutParams); in testGenerateDefaultLayoutParams()
597 LinearLayout.LayoutParams layoutParams = mTableCustomEmpty.generateLayoutParams( in testGenerateLayoutParamsFromLayoutParams() local
599 assertNotNull(layoutParams); in testGenerateLayoutParamsFromLayoutParams()
600 assertEquals(ViewGroup.LayoutParams.MATCH_PARENT, layoutParams.width); in testGenerateLayoutParamsFromLayoutParams()
601 assertEquals(300, layoutParams.height); in testGenerateLayoutParamsFromLayoutParams()
602 assertTrue(layoutParams instanceof TableLayout.LayoutParams); in testGenerateLayoutParamsFromLayoutParams()
DAbsoluteLayoutTest.java96 ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(1, 2); in testCheckLayoutParams() local
97 assertFalse(mMyAbsoluteLayout.checkLayoutParams(layoutParams)); in testCheckLayoutParams()
DTextViewFadingEdgeTest.java173 ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams( in createTextView() local
176 layout.setLayoutParams(layoutParams); in createTextView()
DTextViewTest.java1789 final ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(textViewWidth, in testSetTextUpdatesHeightAfterRemovingImageSpan() local
1791 layout.addView(mTextView, layoutParams); in testSetTextUpdatesHeightAfterRemovingImageSpan()
1792 layout.setLayoutParams(layoutParams); in testSetTextUpdatesHeightAfterRemovingImageSpan()
3241 ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams( in testEllipsizeAndMaxLinesForSingleLine() local
3244 layout.addView(tvEllipsizeEnd, layoutParams); in testEllipsizeAndMaxLinesForSingleLine()
3245 layout.addView(tvEllipsizeNone, layoutParams); in testEllipsizeAndMaxLinesForSingleLine()
3246 layout.addView(tvNoMaxLine, layoutParams); in testEllipsizeAndMaxLinesForSingleLine()
3286 ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams( in testEllipsizeAndMaxLinesForMultiLine() local
3290 layout.addView(tvNoMaxLine, layoutParams); in testEllipsizeAndMaxLinesForMultiLine()
3291 layout.addView(tvEllipsizeEnd, layoutParams); in testEllipsizeAndMaxLinesForMultiLine()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DRVCVCameraPreview.java203 ViewGroup.LayoutParams layoutParams = getLayoutParams(); in adjustLayoutParamsIfNeeded() local
211 layoutParams.width = curWidth; in adjustLayoutParamsIfNeeded()
212 layoutParams.height = (int)(curWidth / cameraAspect); in adjustLayoutParamsIfNeeded()
215 layoutParams.width = (int)(curHeight * cameraAspect); in adjustLayoutParamsIfNeeded()
216 layoutParams.height = curHeight; in adjustLayoutParamsIfNeeded()
219 if (layoutParams.height != curHeight || layoutParams.width != curWidth) { in adjustLayoutParamsIfNeeded()
221 layoutParams.width, layoutParams.height)); in adjustLayoutParamsIfNeeded()
222 setLayoutParams(layoutParams); in adjustLayoutParamsIfNeeded()
/cts/tests/tests/view/surfacevalidator/src/android/view/cts/surfacevalidator/
DAnimationTestCase.java33 FrameLayout.LayoutParams layoutParams, in AnimationTestCase() argument
37 mLayoutParams = layoutParams; in AnimationTestCase()
/cts/hostsidetests/hdmicec/app/src/android/hdmicec/app/
DHdmiCecKeyEventCapture.java48 TableRow.LayoutParams layoutParams = in onCreate() local
54 text.setLayoutParams(layoutParams); in onCreate()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityMagnificationTest.java384 final ViewGroup.LayoutParams layoutParams = topLeftview.getLayoutParams(); in adjustViewBoundsIfNeeded() local
386 layoutParams.width = topLeftview.getWidth() - 1 in adjustViewBoundsIfNeeded()
388 assertTrue("Needs to fix layout", layoutParams.width > 0); in adjustViewBoundsIfNeeded()
391 layoutParams.height = topLeftview.getHeight() - 1 in adjustViewBoundsIfNeeded()
393 assertTrue("Needs to fix layout", layoutParams.height > 0); in adjustViewBoundsIfNeeded()
395 mInstrumentation.runOnMainSync(() -> topLeftview.setLayoutParams(layoutParams)); in adjustViewBoundsIfNeeded()
/cts/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/
DUninstallTest.java115 LayoutParams layoutParams = new LayoutParams(MATCH_PARENT, MATCH_PARENT, in overlaysAreSuppressedWhenConfirmingUninstall() local
117 layoutParams.gravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL; in overlaysAreSuppressedWhenConfirmingUninstall()
123 windowManager.addView(overlay[0], layoutParams); in overlaysAreSuppressedWhenConfirmingUninstall()
/cts/tests/tests/sensorprivacy/test-apps/CtsUseMicOrCameraForSensorPrivacy/src/android/sensorprivacy/cts/usemiccamera/
DBlankActivity.kt13 layout.layoutParams = ViewGroup.LayoutParams( in onCreate()
/cts/tests/tests/transition/src/android/transition/cts/
DChangeImageTransformTest.java341 LayoutParams layoutParams = mImageView.getLayoutParams(); in enterImageViewScene() local
344 layoutParams.width = Math.round(size); in enterImageViewScene()
345 layoutParams.height = Math.round(size * 2); in enterImageViewScene()
346 mImageView.setLayoutParams(layoutParams); in enterImageViewScene()
/cts/tests/tests/view/src/android/view/animation/cts/
DGridLayoutAnimationControllerTest.java345 final AbsListView.LayoutParams layoutParams = new AbsListView.LayoutParams( in setAnimationParameters() local
347 layoutParams.layoutAnimationParameters = animationParams; in setAnimationParameters()
348 return layoutParams; in setAnimationParameters()
DLayoutAnimationControllerTest.java388 final AbsListView.LayoutParams layoutParams = new AbsListView.LayoutParams( in setAnimationParameters() local
390 layoutParams.layoutAnimationParameters = animationParams; in setAnimationParameters()
391 return layoutParams; in setAnimationParameters()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/orientation/
DCameraOrientationActivity.java498 LayoutParams layoutParams = new LayoutParams(newWidth, newHeight);
499 mCameraView.setLayoutParams(layoutParams);

12