Home
last modified time | relevance | path

Searched refs:LayoutParams (Results 1 – 25 of 138) sorted by relevance

123456

/cts/tests/tests/view/src/android/view/cts/
DWindowManager_LayoutParamsTest.java46 private WindowManager.LayoutParams mLayoutParams;
49 new WindowManager.LayoutParams(); in testConstructor()
51 new WindowManager.LayoutParams( in testConstructor()
52 WindowManager.LayoutParams.TYPE_APPLICATION); in testConstructor()
54 new WindowManager.LayoutParams( in testConstructor()
55 WindowManager.LayoutParams.TYPE_APPLICATION, in testConstructor()
56 WindowManager.LayoutParams.FLAG_DITHER); in testConstructor()
58 new WindowManager.LayoutParams( in testConstructor()
59 WindowManager.LayoutParams.TYPE_APPLICATION, in testConstructor()
60 WindowManager.LayoutParams.FLAG_DITHER, PixelFormat.JPEG); in testConstructor()
[all …]
DViewGroup_LayoutParamsTest.java29 import android.view.ViewGroup.LayoutParams;
35 private ViewGroup.LayoutParams mLayoutParams;
43 new ViewGroup.LayoutParams(mContext, parser); in testConstructor()
45 LayoutParams temp = new ViewGroup.LayoutParams(320, 480); in testConstructor()
47 new ViewGroup.LayoutParams(temp); in testConstructor()
65 private class MockLayoutParams extends LayoutParams {
74 public MockLayoutParams(LayoutParams source) { in MockLayoutParams()
DWindowTest.java122 final WindowManager.LayoutParams attrs = mWindow.getAttributes(); in testOpFlags()
125 mWindow.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); in testOpFlags()
126 assertEquals(WindowManager.LayoutParams.FLAG_FULLSCREEN, attrs.flags); in testOpFlags()
128 mWindow.addFlags(WindowManager.LayoutParams.FLAG_DITHER); in testOpFlags()
129 assertEquals(WindowManager.LayoutParams.FLAG_FULLSCREEN in testOpFlags()
130 | WindowManager.LayoutParams.FLAG_DITHER, attrs.flags); in testOpFlags()
132 mWindow.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); in testOpFlags()
133 assertEquals(WindowManager.LayoutParams.FLAG_DITHER, attrs.flags); in testOpFlags()
134 mWindow.clearFlags(WindowManager.LayoutParams.FLAG_DITHER); in testOpFlags()
141 mWindow.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, in testOpFlags()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DFrameLayout_LayoutParamsTest.java33 import android.widget.FrameLayout.LayoutParams;
48 new LayoutParams(mContext, attrs); in testConstructor()
49 new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); in testConstructor()
50 new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 0); in testConstructor()
51 new LayoutParams(new ViewGroup.LayoutParams(mContext, attrs)); in testConstructor()
52 new LayoutParams(new LayoutParams(mContext, attrs)); in testConstructor()
53 new LayoutParams(new MarginLayoutParams(mContext, attrs)); in testConstructor()
56 new LayoutParams(null, null); in testConstructor()
62 new LayoutParams(-1, -1); in testConstructor()
63 new LayoutParams(-1, -1, -1); in testConstructor()
[all …]
DAbsListView_LayoutParamsTest.java29 import android.widget.AbsListView.LayoutParams;
47 AbsListView.LayoutParams layoutParams; in testConstructors()
49 layoutParams = new AbsListView.LayoutParams(getContext(), mAttributeSet); in testConstructors()
53 layoutParams = new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, in testConstructors()
54 LayoutParams.MATCH_PARENT); in testConstructors()
55 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructors()
56 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.height); in testConstructors()
58 layoutParams = new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, in testConstructors()
59 LayoutParams.MATCH_PARENT, 0); in testConstructors()
60 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructors()
[all …]
DAbsoluteLayoutTest.java33 import android.widget.AbsoluteLayout.LayoutParams;
46 private LayoutParams mAbsoluteLayoutParams;
57 mAbsoluteLayoutParams = new LayoutParams(DEFAULT_WIDTH, DEFAULT_HEIGHT, in setUp()
88 ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(1, 2); in testCheckLayoutParams()
101 LayoutParams params = (LayoutParams) layout.generateLayoutParams(getAttributeSet()); in testGenerateLayoutParams1()
104 assertEquals(LayoutParams.MATCH_PARENT, params.width); in testGenerateLayoutParams1()
105 assertEquals(LayoutParams.MATCH_PARENT, params.height); in testGenerateLayoutParams1()
111 LayoutParams params = in testGenerateLayoutParams2()
112 (LayoutParams) mMyAbsoluteLayout.generateLayoutParams(mAbsoluteLayoutParams); in testGenerateLayoutParams2()
120 mMyAbsoluteLayout.generateLayoutParams((LayoutParams) null); in testGenerateLayoutParams2()
[all …]
DLinearLayout_LayoutParamsTest.java25 import android.view.ViewGroup.LayoutParams;
37 new LinearLayout.LayoutParams(getContext(), p); in testConstructor()
39 new LinearLayout.LayoutParams(320, 240); in testConstructor()
41 new LinearLayout.LayoutParams(320, 240, 0); in testConstructor()
43 LayoutParams layoutParams = new LayoutParams(320, 480); in testConstructor()
44 new LinearLayout.LayoutParams(layoutParams); in testConstructor()
47 new LinearLayout.LayoutParams(marginLayoutParams); in testConstructor()
51 LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(320, 240); in testDebug()
DRadioGroup_LayoutParamsTest.java34 import android.widget.RadioGroup.LayoutParams;
42 private LayoutParams mLayoutParams;
51 mLayoutParams = new RadioGroup.LayoutParams(Integer.MIN_VALUE, Integer.MAX_VALUE); in testConstructor()
56 mLayoutParams = new RadioGroup.LayoutParams(Integer.MAX_VALUE, Integer.MIN_VALUE); in testConstructor()
61 mLayoutParams = new RadioGroup.LayoutParams(Integer.MIN_VALUE, Integer.MAX_VALUE, in testConstructor()
67 mLayoutParams = new RadioGroup.LayoutParams(Integer.MIN_VALUE, Integer.MAX_VALUE, in testConstructor()
73 mLayoutParams = new RadioGroup.LayoutParams(new ViewGroup.LayoutParams(40, 60)); in testConstructor()
79 new RadioGroup.LayoutParams((ViewGroup.LayoutParams) null); in testConstructor()
85 mLayoutParams = new RadioGroup.LayoutParams(new MarginLayoutParams(100, 200)); in testConstructor()
100 mLayoutParams = new RadioGroup.LayoutParams(source); in testConstructor()
[all …]
DTableLayout_LayoutParamsTest.java45 new TableLayout.LayoutParams(mTargetContext, null); in testConstructor()
47 TableLayout.LayoutParams layoutParams = new TableLayout.LayoutParams(200, 300); in testConstructor()
48 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
50 TableLayout.LayoutParams oldParams = layoutParams; in testConstructor()
52 layoutParams = new TableLayout.LayoutParams(200, 300, 1.2f); in testConstructor()
53 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
56 TableLayout.LayoutParams oldMarginParams = layoutParams; in testConstructor()
58 new TableLayout.LayoutParams(); in testConstructor()
60 layoutParams = new TableLayout.LayoutParams(oldParams); in testConstructor()
61 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
[all …]
DRadioGroupTest.java38 import android.widget.RadioGroup.LayoutParams;
104 mDefaultRadioGroup.addView(newButton, new RadioGroup.LayoutParams( in testInternalPassThroughHierarchyChangeListener()
105 RadioGroup.LayoutParams.WRAP_CONTENT, RadioGroup.LayoutParams.WRAP_CONTENT)); in testInternalPassThroughHierarchyChangeListener()
117 mDefaultRadioGroup.addView(newButton, new RadioGroup.LayoutParams( in testInternalCheckedStateTracker()
118 RadioGroup.LayoutParams.WRAP_CONTENT, RadioGroup.LayoutParams.WRAP_CONTENT)); in testInternalCheckedStateTracker()
288 RadioGroup.LayoutParams layoutParams = in testGenerateLayoutParams()
298 assertEquals(LayoutParams.WRAP_CONTENT, layoutParams.width); in testGenerateLayoutParams()
299 assertEquals(LayoutParams.WRAP_CONTENT, layoutParams.height); in testGenerateLayoutParams()
311 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.width); in testGenerateLayoutParams()
312 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.height); in testGenerateLayoutParams()
[all …]
DAbsoluteLayout_LayoutParamsTest.java30 import android.widget.AbsoluteLayout.LayoutParams;
44 LayoutParams layoutParams; in testConstructor()
46 layoutParams = new AbsoluteLayout.LayoutParams(1, 2, 3, 4); in testConstructor()
52 LayoutParams params = new AbsoluteLayout.LayoutParams(layoutParams); in testConstructor()
58 new AbsoluteLayout.LayoutParams(mContext, getAttributeSet()); in testConstructor()
62 LayoutParams layoutParams = new AbsoluteLayout.LayoutParams(1, 2, 3, 4); in testDebug()
DTableRow_LayoutParamsTest.java56 new TableRow.LayoutParams(mTargetContext, null); in testConstructor()
58 TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(200, 300); in testConstructor()
63 ViewGroup.LayoutParams oldParams = layoutParams; in testConstructor()
65 layoutParams = new TableRow.LayoutParams(200, 300, 1.2f); in testConstructor()
73 layoutParams = new TableRow.LayoutParams(); in testConstructor()
77 layoutParams = new TableRow.LayoutParams(5); in testConstructor()
81 layoutParams = new TableRow.LayoutParams(oldParams); in testConstructor()
87 layoutParams = new TableRow.LayoutParams(oldMarginParams); in testConstructor()
98 layoutParams = (TableRow.LayoutParams) vVitural1.getLayoutParams(); in testConstructor()
101 layoutParams = (TableRow.LayoutParams) vVitural2.getLayoutParams(); in testConstructor()
[all …]
DGallery_LayoutParamsTest.java27 import android.widget.Gallery.LayoutParams;
38 new LayoutParams(getContext(), p); in testConstructor()
40 LayoutParams params = new LayoutParams(320, 480); in testConstructor()
41 new LayoutParams(params); in testConstructor()
DRelativeLayoutTest.java34 import android.view.ViewGroup.LayoutParams;
266 LayoutParams layoutParams = relativeLayout.generateLayoutParams(parser); in testGenerateLayoutParams1()
267 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.width); in testGenerateLayoutParams1()
268 assertEquals(LayoutParams.MATCH_PARENT, layoutParams.height); in testGenerateLayoutParams1()
272 RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(200, 300); in testGenerateLayoutParams2()
277 RelativeLayout.LayoutParams layoutParams = in testGenerateLayoutParams2()
278 (RelativeLayout.LayoutParams) myRelativeLayout.generateLayoutParams(p); in testGenerateLayoutParams2()
284 myRelativeLayout.generateLayoutParams((ViewGroup.LayoutParams) null); in testGenerateLayoutParams2()
293 ViewGroup.LayoutParams layoutParams = myRelativeLayout.generateDefaultLayoutParams(); in testGenerateDefaultLayoutParams()
294 assertTrue(layoutParams instanceof RelativeLayout.LayoutParams); in testGenerateDefaultLayoutParams()
[all …]
DFrameLayoutTest.java44 import android.widget.FrameLayout.LayoutParams;
191 ViewGroup.LayoutParams p = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, in testGenerateLayoutParams1()
192 ViewGroup.LayoutParams.WRAP_CONTENT); in testGenerateLayoutParams1()
194 ViewGroup.LayoutParams params = myFrameLayout.generateLayoutParams(p); in testGenerateLayoutParams1()
196 assertTrue(params instanceof FrameLayout.LayoutParams); in testGenerateLayoutParams1()
197 assertEquals(ViewGroup.LayoutParams.MATCH_PARENT, params.width); in testGenerateLayoutParams1()
198 assertEquals(ViewGroup.LayoutParams.WRAP_CONTENT, params.height); in testGenerateLayoutParams1()
204 FrameLayout.LayoutParams params = mFrameLayout.generateLayoutParams(attrs); in testGenerateLayoutParams2()
206 assertEquals(ViewGroup.LayoutParams.MATCH_PARENT, params.width); in testGenerateLayoutParams2()
207 assertEquals(ViewGroup.LayoutParams.MATCH_PARENT, params.height); in testGenerateLayoutParams2()
[all …]
DLinearLayoutTest.java34 import android.widget.LinearLayout.LayoutParams;
183 layout.addView(new View(mActivity), new LayoutParams(0, 0, 1)); in testWeightDistribution()
191 LayoutParams lp = (LayoutParams) child.getLayoutParams(); in testWeightDistribution()
193 lp.width = LayoutParams.MATCH_PARENT; in testWeightDistribution()
210 LayoutParams lp = (LayoutParams) child.getLayoutParams(); in testWeightDistribution()
211 lp.height = LayoutParams.MATCH_PARENT; in testWeightDistribution()
229 ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(320, 240); in testGenerateLayoutParams()
231 LayoutParams layoutParams1 = mockLinearLayout.generateLayoutParams(lp); in testGenerateLayoutParams()
247 ViewGroup.LayoutParams params = new AbsoluteLayout.LayoutParams(240, 320, 0, 0); in testCheckLayoutParams()
250 params = new LinearLayout.LayoutParams(240, 320); in testCheckLayoutParams()
[all …]
DGridLayoutTest.java148 gridLayout.addView(new TextView(mContext), new AbsoluteLayout.LayoutParams(0, 0, 0, 0)); in testCheckLayoutParams()
150 gridLayout.addView(new TextView(mContext), new GridLayout.LayoutParams( in testCheckLayoutParams()
158 ViewGroup.LayoutParams lp = gridLayout.generateLayoutParams(null); in testGenerateDefaultLayoutParams()
160 assertTrue(lp instanceof GridLayout.LayoutParams); in testGenerateDefaultLayoutParams()
161 assertEquals(ViewGroup.LayoutParams.WRAP_CONTENT, lp.width); in testGenerateDefaultLayoutParams()
162 assertEquals(ViewGroup.LayoutParams.WRAP_CONTENT, lp.height); in testGenerateDefaultLayoutParams()
172 GridLayout.LayoutParams generated = gridLayout.generateLayoutParams(lp); in testGenerateLayoutParamsFromMarginParams()
192 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(0), spec(0)); in populate()
200 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(row), spec(0)); in populate()
211 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(0), spec(col)); in populate()
[all …]
DRelativeLayout_LayoutParamsTest.java40 RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(200, 300); in testConstructor()
44 RelativeLayout.LayoutParams tempLayoutParams = layoutParams; in testConstructor()
45 layoutParams = new RelativeLayout.LayoutParams(tempLayoutParams); in testConstructor()
50 layoutParams = new RelativeLayout.LayoutParams(tempMarginLayoutParams); in testConstructor()
67 layoutParams = (RelativeLayout.LayoutParams) (view1.getLayoutParams()); in testConstructor()
76 layoutParams = (RelativeLayout.LayoutParams) (view2.getLayoutParams()); in testConstructor()
88 layoutParams = (RelativeLayout.LayoutParams) (view3.getLayoutParams()); in testConstructor()
99 layoutParams = (RelativeLayout.LayoutParams) (view4.getLayoutParams()); in testConstructor()
109 layoutParams = (RelativeLayout.LayoutParams) (view5.getLayoutParams()); in testConstructor()
119 layoutParams = (RelativeLayout.LayoutParams) (view6.getLayoutParams()); in testConstructor()
[all …]
DTextSwitcherTest.java65 textSwitcher.addView(tv1, 0, new ViewGroup.LayoutParams(PARAMS_WIDTH, PARAMS_HEIGHT)); in testSetText()
66 textSwitcher.addView(tv2, 1, new ViewGroup.LayoutParams(PARAMS_WIDTH, PARAMS_HEIGHT)); in testSetText()
105 textSwitcher.addView(tv1, 0, new ViewGroup.LayoutParams(PARAMS_WIDTH, PARAMS_HEIGHT)); in testSetCurrentText()
106 textSwitcher.addView(tv2, 1, new ViewGroup.LayoutParams(PARAMS_WIDTH, PARAMS_HEIGHT)); in testSetCurrentText()
139 textSwitcher.addView(tv1, 0, new ViewGroup.LayoutParams(PARAMS_WIDTH, PARAMS_HEIGHT)); in testAddView()
145 textSwitcher.addView(tv1, 0, new ViewGroup.LayoutParams(PARAMS_WIDTH, PARAMS_HEIGHT)); in testAddView()
153 new ViewGroup.LayoutParams(PARAMS_WIDTH, PARAMS_HEIGHT)); in testAddView()
160 new ViewGroup.LayoutParams(PARAMS_WIDTH, PARAMS_HEIGHT)); in testAddView()
168 textSwitcher.addView(tv3, 2, new ViewGroup.LayoutParams(PARAMS_WIDTH, PARAMS_HEIGHT)); in testAddView()
178 textSwitcher.addView(lv, 0, new ViewGroup.LayoutParams(PARAMS_WIDTH, PARAMS_HEIGHT)); in testAddView()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DBoxInsetLayout.java117 LayoutParams lp = (BoxInsetLayout.LayoutParams) child.getLayoutParams(); in onMeasure()
124 if ((lp.boxedEdges & LayoutParams.BOX_LEFT) == 0) { in onMeasure()
127 if ((lp.boxedEdges & LayoutParams.BOX_RIGHT) == 0) { in onMeasure()
130 if ((lp.boxedEdges & LayoutParams.BOX_TOP) == 0) { in onMeasure()
133 if ((lp.boxedEdges & LayoutParams.BOX_BOTTOM) == 0) { in onMeasure()
178 final LayoutParams lp = (BoxInsetLayout.LayoutParams) child.getLayoutParams(); in onMeasure()
190 if (mLastKnownRound && ((lp.boxedEdges & LayoutParams.BOX_LEFT) != 0)) { in onMeasure()
195 if (mLastKnownRound && ((lp.boxedEdges & LayoutParams.BOX_RIGHT) != 0)) { in onMeasure()
200 if (lp.width == LayoutParams.MATCH_PARENT) { in onMeasure()
212 if (mLastKnownRound && ((lp.boxedEdges & LayoutParams.BOX_TOP) != 0)) { in onMeasure()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/util/
DListItemFactory.java51 final LinearLayout.LayoutParams buttonLp = in twoButtonsSeparatedByFiller()
52 new LinearLayout.LayoutParams( in twoButtonsSeparatedByFiller()
53 ViewGroup.LayoutParams.MATCH_PARENT, in twoButtonsSeparatedByFiller()
63 middleFiller.setLayoutParams(new LinearLayout.LayoutParams( in twoButtonsSeparatedByFiller()
64 ViewGroup.LayoutParams.MATCH_PARENT, in twoButtonsSeparatedByFiller()
96 final LinearLayout.LayoutParams lp in horizontalButtonSlots()
97 = new LinearLayout.LayoutParams(0, desiredHeight); in horizontalButtonSlots()
158 final ViewGroup.LayoutParams lp = new AbsListView.LayoutParams( in button()
159 ViewGroup.LayoutParams.MATCH_PARENT, in button()
160 ViewGroup.LayoutParams.WRAP_CONTENT); in button()
[all …]
/cts/hostsidetests/services/activitymanager/app/src/android/server/app/
DTurnScreenOnActivity.java26 getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON in onCreate()
27 | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED in onCreate()
28 | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD in onCreate()
29 | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); in onCreate()
/cts/tests/tests/permission/src/android/permission/cts/
DPermissionStubActivity.java23 import android.view.ViewGroup.LayoutParams;
37 mListView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, in onCreate()
38 LayoutParams.WRAP_CONTENT)); in onCreate()
/cts/tests/tests/systemui/src/android/systemui/cts/
DLightStatusBarActivity.java22 import android.view.ViewGroup.LayoutParams;
36 mContent.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, in onCreate()
37 LayoutParams.MATCH_PARENT)); in onCreate()
/cts/hostsidetests/trustedvoice/app/src/android/trustedvoice/app/
DTrustedVoiceActivity.java24 import android.view.WindowManager.LayoutParams;
45 getWindow().addFlags(LayoutParams.FLAG_DISMISS_KEYGUARD in onCreate()
46 | LayoutParams.FLAG_TURN_SCREEN_ON in onCreate()
47 | LayoutParams.FLAG_KEEP_SCREEN_ON); in onCreate()

123456