Home
last modified time | relevance | path

Searched refs:lp (Results 1 – 25 of 44) sorted by relevance

12

/cts/tests/framework/base/windowmanager/src/android/server/wm/input/
DWindowInputTests.java139 final var lp = new WindowManager.LayoutParams(); in addActivityWindow() local
140 lp.setTitle(SECOND_WINDOW_NAME); in addActivityWindow()
141 lp.flags = FLAG_NOT_TOUCH_MODAL | FLAG_LAYOUT_IN_SCREEN; in addActivityWindow()
142 lp.width = TAPPING_TARGET_WINDOW_SIZE; in addActivityWindow()
143 lp.height = TAPPING_TARGET_WINDOW_SIZE; in addActivityWindow()
144 lp.type = WindowManager.LayoutParams.TYPE_APPLICATION; in addActivityWindow()
145 lp.gravity = Gravity.CENTER; in addActivityWindow()
149 windowConfig.accept(view, lp); in addActivityWindow()
150 mActivity.addWindow(view, lp); in addActivityWindow()
153 waitForWindowOnTop(lp.getTitle().toString()); in addActivityWindow()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/displaycutout/
DDisplayCutoutTestActivity.java56 WindowManager.LayoutParams lp = getWindow().getAttributes(); in onCreate() local
57 lp.layoutInDisplayCutoutMode = in onCreate()
59 getWindow().setAttributes(lp); in onCreate()
96 ViewGroup.MarginLayoutParams lp = in updateButtons() local
98 lp.leftMargin = safeInsets.left; in updateButtons()
99 lp.topMargin = safeInsets.top + mButtonSize; in updateButtons()
100 lp.bottomMargin = safeInsets.bottom + mButtonSize; in updateButtons()
101 mLeftButtons.setLayoutParams(lp); in updateButtons()
105 lp = (ViewGroup.MarginLayoutParams) mTopButtons.getLayoutParams(); in updateButtons()
106 lp.leftMargin = safeInsets.left + mButtonSize; in updateButtons()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DBoxInsetLayout.java117 LayoutParams lp = (BoxInsetLayout.LayoutParams) child.getLayoutParams(); in onMeasure() local
124 if ((lp.boxedEdges & LayoutParams.BOX_LEFT) == 0) { in onMeasure()
125 marginLeft = lp.leftMargin; in onMeasure()
127 if ((lp.boxedEdges & LayoutParams.BOX_RIGHT) == 0) { in onMeasure()
128 marginRight = lp.rightMargin; in onMeasure()
130 if ((lp.boxedEdges & LayoutParams.BOX_TOP) == 0) { in onMeasure()
131 marginTop = lp.topMargin; in onMeasure()
133 if ((lp.boxedEdges & LayoutParams.BOX_BOTTOM) == 0) { in onMeasure()
134 marginBottom = lp.bottomMargin; in onMeasure()
138 marginLeft = lp.leftMargin; in onMeasure()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DGridLayoutTest.java182 ViewGroup.LayoutParams lp = mGridLayout.generateLayoutParams(null); in testGenerateDefaultLayoutParams() local
183 assertNotNull(lp); in testGenerateDefaultLayoutParams()
184 assertTrue(lp instanceof GridLayout.LayoutParams); in testGenerateDefaultLayoutParams()
185 assertEquals(ViewGroup.LayoutParams.WRAP_CONTENT, lp.width); in testGenerateDefaultLayoutParams()
186 assertEquals(ViewGroup.LayoutParams.WRAP_CONTENT, lp.height); in testGenerateDefaultLayoutParams()
192 ViewGroup.MarginLayoutParams lp = new ViewGroup.MarginLayoutParams(3, 5); in testGenerateLayoutParamsFromMarginParams() local
193 lp.leftMargin = 1; in testGenerateLayoutParamsFromMarginParams()
194 lp.topMargin = 2; in testGenerateLayoutParamsFromMarginParams()
195 lp.rightMargin = 3; in testGenerateLayoutParamsFromMarginParams()
196 lp.bottomMargin = 4; in testGenerateLayoutParamsFromMarginParams()
[all …]
DToastPresenterTest.java69 WindowManager.LayoutParams lp = (WindowManager.LayoutParams) view.getLayoutParams(); in testUpdateLayoutParams() local
70 assertEquals(1, lp.x); in testUpdateLayoutParams()
71 assertEquals(2, lp.y); in testUpdateLayoutParams()
72 assertEquals(3, (int) lp.horizontalMargin); in testUpdateLayoutParams()
73 assertEquals(4, (int) lp.verticalMargin); in testUpdateLayoutParams()
DFrameLayoutTest.java244 ViewGroup.MarginLayoutParams lp = new ViewGroup.MarginLayoutParams(3, 5); in testGenerateLayoutParamsFromMarginParams() local
245 lp.leftMargin = 1; in testGenerateLayoutParamsFromMarginParams()
246 lp.topMargin = 2; in testGenerateLayoutParamsFromMarginParams()
247 lp.rightMargin = 3; in testGenerateLayoutParamsFromMarginParams()
248 lp.bottomMargin = 4; in testGenerateLayoutParamsFromMarginParams()
249 LayoutParams generated = (LayoutParams) myFrameLayout.generateLayoutParams(lp); in testGenerateLayoutParamsFromMarginParams()
DRelativeLayoutTest.java308 ViewGroup.MarginLayoutParams lp = new ViewGroup.MarginLayoutParams(3, 5); in testGenerateLayoutParamsFromMarginParams() local
309 lp.leftMargin = 1; in testGenerateLayoutParamsFromMarginParams()
310 lp.topMargin = 2; in testGenerateLayoutParamsFromMarginParams()
311 lp.rightMargin = 3; in testGenerateLayoutParamsFromMarginParams()
312 lp.bottomMargin = 4; in testGenerateLayoutParamsFromMarginParams()
314 layout.generateLayoutParams(lp); in testGenerateLayoutParamsFromMarginParams()
DLinearLayoutTest.java237 LayoutParams lp = (LayoutParams) child.getLayoutParams(); in testWeightDistribution() local
238 lp.height = 0; in testWeightDistribution()
239 lp.width = LayoutParams.MATCH_PARENT; in testWeightDistribution()
240 child.setLayoutParams(lp); in testWeightDistribution()
256 LayoutParams lp = (LayoutParams) child.getLayoutParams(); in testWeightDistribution() local
257 lp.height = LayoutParams.MATCH_PARENT; in testWeightDistribution()
258 lp.width = 0; in testWeightDistribution()
259 child.setLayoutParams(lp); in testWeightDistribution()
277 ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(320, 240); in testGenerateLayoutParams() local
279 LayoutParams layoutParams1 = parent.generateLayoutParams(lp); in testGenerateLayoutParams()
[all …]
DHorizontalScrollViewTest.java518 FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(10, 10); in testFillViewportWithChildMargins() local
519 lp.leftMargin = 3; in testFillViewportWithChildMargins()
520 lp.topMargin = 10; in testFillViewportWithChildMargins()
521 lp.rightMargin = 5; in testFillViewportWithChildMargins()
522 lp.bottomMargin = 7; in testFillViewportWithChildMargins()
524 child.setLayoutParams(lp); in testFillViewportWithChildMargins()
563 FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams( in testFillViewportWithChildMarginsAlreadyFills() local
567 lp.leftMargin = 3; in testFillViewportWithChildMarginsAlreadyFills()
568 lp.topMargin = 10; in testFillViewportWithChildMarginsAlreadyFills()
569 lp.rightMargin = 5; in testFillViewportWithChildMarginsAlreadyFills()
[all …]
DScrollViewTest.java530 FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(10, 10); in testFillViewportWithChildMargins() local
531 lp.leftMargin = 3; in testFillViewportWithChildMargins()
532 lp.topMargin = 10; in testFillViewportWithChildMargins()
533 lp.rightMargin = 5; in testFillViewportWithChildMargins()
534 lp.bottomMargin = 7; in testFillViewportWithChildMargins()
536 child.setLayoutParams(lp); in testFillViewportWithChildMargins()
575 FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams( in testFillViewportWithChildMarginsAlreadyFills() local
579 lp.leftMargin = 3; in testFillViewportWithChildMarginsAlreadyFills()
580 lp.topMargin = 10; in testFillViewportWithChildMarginsAlreadyFills()
581 lp.rightMargin = 5; in testFillViewportWithChildMarginsAlreadyFills()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/util/
DListItemFactory.java96 final LinearLayout.LayoutParams lp in horizontalButtonSlots() local
98 lp.setMargins(10, 0, 10, 0); in horizontalButtonSlots()
99 lp.weight = 0.33f; in horizontalButtonSlots()
121 ll.addView(button, lp); in horizontalButtonSlots()
123 ll.addView(new View(context), lp); in horizontalButtonSlots()
129 ll.addView(button, lp); in horizontalButtonSlots()
131 ll.addView(new View(context), lp); in horizontalButtonSlots()
137 ll.addView(button, lp); in horizontalButtonSlots()
139 ll.addView(new View(context), lp); in horizontalButtonSlots()
158 final ViewGroup.LayoutParams lp = new AbsListView.LayoutParams( in button() local
[all …]
/cts/tests/mediapc/src/android/mediapc/cts/
DTestActivity.java92 ViewGroup.LayoutParams lp = mSurfaceView.getLayoutParams(); in setScreenParams() local
95 lp.width = width; in setScreenParams()
96 lp.height = height; in setScreenParams()
100 lp.width = dm.widthPixels; in setScreenParams()
101 lp.height = a; in setScreenParams()
103 lp.width = dm.heightPixels * width / height; in setScreenParams()
104 lp.height = dm.heightPixels; in setScreenParams()
107 runOnUiThread(() -> mSurfaceView.setLayoutParams(lp)); in setScreenParams()
/cts/tests/media/common/src/android/mediav2/common/cts/
DCodecTestActivity.java98 ViewGroup.LayoutParams lp = mSurfaceView.getLayoutParams(); in setScreenParams() local
101 lp.width = width; in setScreenParams()
102 lp.height = height; in setScreenParams()
106 lp.width = dm.widthPixels; in setScreenParams()
107 lp.height = a; in setScreenParams()
109 lp.width = dm.heightPixels * width / height; in setScreenParams()
110 lp.height = dm.heightPixels; in setScreenParams()
113 runOnUiThread(() -> mSurfaceView.setLayoutParams(lp)); in setScreenParams()
/cts/tests/camera/src/android/hardware/cts/
DCameraCtsActivity.java38 ViewGroup.LayoutParams lp = mSurfaceView.getLayoutParams(); in onCreate() local
39 lp.width = LAYOUT_WIDTH; in onCreate()
40 lp.height = LAYOUT_HEIGHT; in onCreate()
41 mSurfaceView.setLayoutParams(lp); in onCreate()
/cts/tests/tests/vcn/src/android/net/vcn/cts/
DTestNetworkWrapper.java134 final LinkProperties lp = createLinkPropertiesForIface(iface, mtu); in TestNetworkWrapper() local
136 final VcnNetworkPolicyResult policy = mVcnManager.applyVcnNetworkPolicy(nc, lp); in TestNetworkWrapper()
143 context, Looper.getMainLooper(), policy.getNetworkCapabilities(), lp); in TestNetworkWrapper()
175 final LinkProperties lp = new LinkProperties(); in createLinkPropertiesForIface() local
176 lp.setInterfaceName(iface); in createLinkPropertiesForIface()
177 lp.setMtu(mtu); in createLinkPropertiesForIface()
186 lp.addLinkAddress( in createLinkPropertiesForIface()
199 lp.addRoute( in createLinkPropertiesForIface()
207 lp.addRoute( in createLinkPropertiesForIface()
215 return lp; in createLinkPropertiesForIface()
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/animations/
DLocationInWindowTests.java116 private void runTest(LayoutParams lp) { in runTest() argument
117 final TestActivity activity = launchAndWait(mActivity, lp); in runTest()
168 LayoutParams lp) { in launchAndWait() argument
170 new Intent().putExtra(EXTRA_LAYOUT_PARAMS, lp)); in launchAndWait()
192 final FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(1, 1); in onCreate() local
193 lp.leftMargin = 6; in onCreate()
194 lp.topMargin = 7; in onCreate()
195 frame.addView(mView, lp); in onCreate()
DLocationOnScreenTests.java128 private void runTest(LayoutParams lp) { in runTest() argument
129 final TestActivity activity = launchAndWait(mDisplayCutoutActivity, lp); in runTest()
154 LayoutParams lp) { in launchAndWait() argument
156 new Intent().putExtra(EXTRA_LAYOUT_PARAMS, lp)); in launchAndWait()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/streamquality/
DPlayVideoActivity.java194 LayoutParams lp = mSurfaceView.getLayoutParams();
197 lp.width = rect.width();
198 lp.height = (int) (rect.width() / aspectRatio);
200 lp.width = (int) (rect.height() * aspectRatio);
201 lp.height = rect.height();
203 mSurfaceView.setLayoutParams(lp);
/cts/tests/camera/src/android/hardware/multiprocess/camera/cts/
DMediaRecorderCameraActivity.java76 ViewGroup.LayoutParams lp = mSurfaceView.getLayoutParams(); in onResume() local
77 lp.width = LAYOUT_WIDTH; in onResume()
78 lp.height = LAYOUT_HEIGHT; in onResume()
79 mSurfaceView.setLayoutParams(lp); in onResume()
/cts/tests/tests/view/src/android/view/cts/
DViewAnimationMatrixTest.java109 final ViewGroup.MarginLayoutParams lp = in moveToTopLeftCorner() local
112 matrix.setRotate(-view.getRotation(), lp.width / 2f, lp.height / 2f); in moveToTopLeftCorner()
113 matrix.postTranslate(-lp.leftMargin, 0); in moveToTopLeftCorner()
/cts/tests/surfacecontrol/src/android/view/cts/util/
DEmbeddedSCVHService.java166 public void relayout(WindowManager.LayoutParams lp) { in relayout() argument
168 mSlowView.setText(lp.width + "x" + lp.height); in relayout()
169 mVr.relayout(lp.width, lp.height); in relayout()
DSyncValidatorSCVHTestCase.java91 final WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
95 mIAttachEmbeddedWindow.relayout(lp);
/cts/tests/surfacecontrol/src/android/view/cts/util/aidl/
DIAttachEmbeddedWindow.aidl28 void relayout(in LayoutParams lp); in relayout() argument
/cts/tests/framework/base/windowmanager/src/android/server/wm/insets/
DWindowInsetsLayoutTests.java204 WindowManager.LayoutParams lp = getWindow().getAttributes(); in onCreate() local
205 lp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; in onCreate()
206 getWindow().setAttributes(lp); in onCreate()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/
DImeInsetsVisibilityTest.java354 LinearLayout.LayoutParams lp = in testEditorWontCoveredByImeWhenInputWindowBehindPanel()
356 lp.setMargins(0, 0, 0, editText.getRootView().getMeasuredHeight() in testEditorWontCoveredByImeWhenInputWindowBehindPanel()
366 final WindowManager.LayoutParams lp = new WindowManager.LayoutParams( in testEditorWontCoveredByImeWhenInputWindowBehindPanel()
373 lp.setFitInsetsTypes(WindowInsets.Type.ime() | WindowInsets.Type.systemBars()); in testEditorWontCoveredByImeWhenInputWindowBehindPanel()
374 lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; in testEditorWontCoveredByImeWhenInputWindowBehindPanel()
375 lp.token = testActivity.getWindow().getDecorView().getWindowToken(); in testEditorWontCoveredByImeWhenInputWindowBehindPanel()
376 testActivity.getWindowManager().addView(panel, lp); in testEditorWontCoveredByImeWhenInputWindowBehindPanel()

12