Home
last modified time | relevance | path

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

1234567891011

/frameworks/base/core/tests/coretests/src/android/preference/
DListPreferenceTest.java28 ListPreference lp = new ListPreference(getContext()); in testListPreferenceSummaryFromEntries() local
29 lp.setEntries(entries); in testListPreferenceSummaryFromEntries()
30 lp.setEntryValues(entryValues); in testListPreferenceSummaryFromEntries()
32 lp.setValue(entryValues[1]); in testListPreferenceSummaryFromEntries()
33 assertTrue(lp.getSummary() == null); in testListPreferenceSummaryFromEntries()
35 lp.setSummary("%1$s"); in testListPreferenceSummaryFromEntries()
36 assertEquals(entries[1], lp.getSummary()); in testListPreferenceSummaryFromEntries()
38 lp.setValue(entryValues[2]); in testListPreferenceSummaryFromEntries()
39 assertEquals(entries[2], lp.getSummary()); in testListPreferenceSummaryFromEntries()
41 lp.setSummary(null); in testListPreferenceSummaryFromEntries()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/complication/
DComplicationLayoutEngineTest.java76 public final ComplicationLayoutParams lp; field in ComplicationLayoutEngineTest.ViewInfo
85 this.lp = params; in ViewInfo()
114 engine.addComplication(info.id, info.view, info.lp, info.category); in addComplication()
172 verifyChange(firstViewInfo, false, lp -> { in testComplicationMarginPosition()
173 assertThat(lp.topMargin).isEqualTo(topMargin); in testComplicationMarginPosition()
174 assertThat(lp.getMarginEnd()).isEqualTo(endMargin); in testComplicationMarginPosition()
178 verifyChange(secondViewInfo, false, lp -> { in testComplicationMarginPosition()
179 assertThat(lp.topMargin).isEqualTo(spacing); in testComplicationMarginPosition()
180 assertThat(lp.getMarginEnd()).isEqualTo(endMargin); in testComplicationMarginPosition()
204 verifyChange(firstViewInfo, true, lp -> { in testSingleLayout()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DNotificationOptimizedLinearLayout.java167 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in requiresNegativeMarginHandlingForHorizontalLinearLayout() local
168 if (lp.leftMargin < 0 || lp.rightMargin < 0) { in requiresNegativeMarginHandlingForHorizontalLinearLayout()
192 final ViewGroup.LayoutParams lp = child.getLayoutParams(); in requiresMatchParentRemeasureForVerticalLinearLayout() local
193 if (nonExactWidth && lp.width == ViewGroup.LayoutParams.MATCH_PARENT) { in requiresMatchParentRemeasureForVerticalLinearLayout()
219 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in requiresBaselineAlignmentForHorizontalLinearLayout() local
222 if (lp.height != LayoutParams.MATCH_PARENT) { in requiresBaselineAlignmentForHorizontalLinearLayout()
229 int gravity = lp.gravity; in requiresBaselineAlignmentForHorizontalLinearLayout()
258 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in getSingleWeightedChild() local
259 if ((!isVertical && lp.width == ViewGroup.LayoutParams.MATCH_PARENT) in getSingleWeightedChild()
260 || (isVertical && lp.height == ViewGroup.LayoutParams.MATCH_PARENT)) { in getSingleWeightedChild()
[all …]
DDialogViewAnimator.java57 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
58 final boolean matchWidth = lp.width == LayoutParams.MATCH_PARENT; in onMeasure()
59 final boolean matchHeight = lp.height == LayoutParams.MATCH_PARENT; in onMeasure()
72 + lp.leftMargin + lp.rightMargin); in onMeasure()
78 + lp.topMargin + lp.bottomMargin); in onMeasure()
110 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in onMeasure() local
113 if (lp.width == LayoutParams.MATCH_PARENT) { in onMeasure()
116 - lp.leftMargin - lp.rightMargin, in onMeasure()
120 getPaddingLeft() + getPaddingRight() + lp.leftMargin + lp.rightMargin, in onMeasure()
121 lp.width); in onMeasure()
[all …]
DMessagingLinearLayout.java95 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
96 lp.hide = true; in onMeasure()
123 LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams(); in onMeasure() local
145 int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin + in onMeasure()
146 lp.bottomMargin + spacing + previousChildIncrease); in onMeasure()
168 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin in onMeasure()
170 lp.hide = false; in onMeasure()
221 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onLayout() local
229 childLeft = childRight - childWidth - lp.rightMargin; in onLayout()
231 childLeft = paddingLeft + lp.leftMargin; in onLayout()
[all …]
DWatchListDecorLayout.java113 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in applyMeasureToChild() local
116 if (lp.width == LayoutParams.MATCH_PARENT) { in applyMeasureToChild()
119 - lp.leftMargin - lp.rightMargin); in applyMeasureToChild()
125 lp.leftMargin + lp.rightMargin, in applyMeasureToChild()
126 lp.width); in applyMeasureToChild()
130 if (lp.height == LayoutParams.MATCH_PARENT) { in applyMeasureToChild()
133 - lp.topMargin - lp.bottomMargin); in applyMeasureToChild()
139 lp.topMargin + lp.bottomMargin, in applyMeasureToChild()
140 lp.height); in applyMeasureToChild()
175 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
[all …]
DGridLayoutManager.java146 ViewGroup.LayoutParams lp = host.getLayoutParams(); in onInitializeAccessibilityNodeInfoForItem() local
147 if (!(lp instanceof LayoutParams)) { in onInitializeAccessibilityNodeInfoForItem()
151 LayoutParams glp = (LayoutParams) lp; in onInitializeAccessibilityNodeInfoForItem()
190 final LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams(); in cachePreLayoutSpanMapping() local
191 final int viewPosition = lp.getViewLayoutPosition(); in cachePreLayoutSpanMapping()
192 mPreLayoutSpanSizeCache.put(viewPosition, lp.getSpanSize()); in cachePreLayoutSpanMapping()
193 mPreLayoutSpanIndexCache.put(viewPosition, lp.getSpanIndex()); in cachePreLayoutSpanMapping()
240 public RecyclerView.LayoutParams generateLayoutParams(ViewGroup.LayoutParams lp) { in generateLayoutParams() argument
241 if (lp instanceof ViewGroup.MarginLayoutParams) { in generateLayoutParams()
242 return new LayoutParams((ViewGroup.MarginLayoutParams) lp); in generateLayoutParams()
[all …]
/frameworks/base/core/java/android/widget/
DFrameLayout.java195 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
197 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin); in onMeasure()
199 child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin); in onMeasure()
202 if (lp.width == LayoutParams.MATCH_PARENT || in onMeasure()
203 lp.height == LayoutParams.MATCH_PARENT) { in onMeasure()
233 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in onMeasure() local
236 if (lp.width == LayoutParams.MATCH_PARENT) { in onMeasure()
239 - lp.leftMargin - lp.rightMargin); in onMeasure()
245 lp.leftMargin + lp.rightMargin, in onMeasure()
246 lp.width); in onMeasure()
[all …]
DActionMenuView.java167 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
168 lp.leftMargin = lp.rightMargin = 0; in onMeasure()
224 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasureExactFormat() local
225 lp.expanded = false; in onMeasureExactFormat()
226 lp.extraPixels = 0; in onMeasureExactFormat()
227 lp.cellsUsed = 0; in onMeasureExactFormat()
228 lp.expandable = false; in onMeasureExactFormat()
229 lp.leftMargin = 0; in onMeasureExactFormat()
230 lp.rightMargin = 0; in onMeasureExactFormat()
231 lp.preventEdgeOffset = isGeneratedItem && ((ActionMenuItemView) child).hasText(); in onMeasureExactFormat()
[all …]
DLinearLayout.java441 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
442 final int top = child.getTop() - lp.topMargin - mDividerHeight; in drawDividersVertical()
454 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
455 bottom = child.getBottom() + lp.bottomMargin; in drawDividersVertical()
482 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
485 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
487 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
504 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
506 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
508 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
[all …]
DToolbar.java1179 final LayoutParams lp = generateDefaultLayoutParams(); in ensureMenuView() local
1180 lp.gravity = Gravity.END | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureMenuView()
1181 mMenuView.setLayoutParams(lp); in ensureMenuView()
1497 final LayoutParams lp = generateDefaultLayoutParams(); in ensureNavButtonView() local
1498 lp.gravity = Gravity.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureNavButtonView()
1499 mNavButtonView.setLayoutParams(lp); in ensureNavButtonView()
1508 final LayoutParams lp = generateDefaultLayoutParams(); in ensureCollapseButtonView() local
1509 lp.gravity = Gravity.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureCollapseButtonView()
1510 lp.mViewType = LayoutParams.EXPANDED; in ensureCollapseButtonView()
1511 mCollapseButtonView.setLayoutParams(lp); in ensureCollapseButtonView()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/
DMirrorWindowControl.java97 final LayoutParams lp = new LayoutParams(); in showControl() local
100 lp.width = viewSize.x <= 0 ? defaultSize : viewSize.x; in showControl()
101 lp.height = viewSize.y <= 0 ? defaultSize : viewSize.y; in showControl()
102 setDefaultParams(lp); in showControl()
103 setDefaultPosition(lp); in showControl()
104 mWindowManager.addView(mControlsView, lp); in showControl()
105 updateDraggableBound(lp.width, lp.height); in showControl()
108 private void setDefaultParams(LayoutParams lp) { in setDefaultParams() argument
109 lp.gravity = Gravity.TOP | Gravity.LEFT; in setDefaultParams()
110 lp.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL in setDefaultParams()
[all …]
/frameworks/base/core/java/android/service/voice/
DVoiceInteractionWindow.java105 WindowManager.LayoutParams lp = getWindow().getAttributes(); in setToken() local
106 lp.token = token; in setToken()
107 getWindow().setAttributes(lp); in setToken()
181 private void updateWidthHeight(WindowManager.LayoutParams lp) { in updateWidthHeight() argument
182 if (lp.gravity == Gravity.TOP || lp.gravity == Gravity.BOTTOM) { in updateWidthHeight()
183 lp.width = WindowManager.LayoutParams.MATCH_PARENT; in updateWidthHeight()
184 lp.height = WindowManager.LayoutParams.WRAP_CONTENT; in updateWidthHeight()
186 lp.width = WindowManager.LayoutParams.WRAP_CONTENT; in updateWidthHeight()
187 lp.height = WindowManager.LayoutParams.MATCH_PARENT; in updateWidthHeight()
233 WindowManager.LayoutParams lp = getWindow().getAttributes(); in initDockWindow() local
[all …]
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/
DToolbarView.kt52 var lp = layoutParams as FrameLayout.LayoutParams? in onApplyWindowInsets() variable
53 if (lp != null && insets != null) { in onApplyWindowInsets()
55 lp.topMargin = insets.stableInsetTop in onApplyWindowInsets()
56 lp.bottomMargin = insets.stableInsetBottom in onApplyWindowInsets()
58 lp.topMargin = insets.systemWindowInsetTop in onApplyWindowInsets()
59 lp.bottomMargin = insets.systemWindowInsetBottom in onApplyWindowInsets()
61 layoutParams = lp in onApplyWindowInsets()
/frameworks/base/core/tests/coretests/src/android/widget/listview/
DListViewHeight.java62 ViewGroup.MarginLayoutParams lp; in onCreate()
63 lp = (ViewGroup.MarginLayoutParams) mInnerList.getLayoutParams(); in onCreate()
64 lp.height = 200; in onCreate()
65 mInnerList.setLayoutParams(lp); in onCreate()
78 ViewGroup.MarginLayoutParams lp; in onCreate()
79 lp = (ViewGroup.MarginLayoutParams) mInnerList.getLayoutParams(); in onCreate()
80 lp.height = lp.MATCH_PARENT; in onCreate()
81 mInnerList.setLayoutParams(lp); in onCreate()
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DLockIconView.java131 final FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams(); in setCenterLocation() local
132 if (lp != null) { in setCenterLocation()
133 lp.width = (int) (mSensorRect.right - mSensorRect.left); in setCenterLocation()
134 lp.height = (int) (mSensorRect.bottom - mSensorRect.top); in setCenterLocation()
135 lp.topMargin = (int) mSensorRect.top; in setCenterLocation()
136 lp.setMarginStart((int) mSensorRect.left); in setCenterLocation()
137 setLayoutParams(lp); in setCenterLocation()
189 LayoutParams lp = (LayoutParams) mLockIcon.getLayoutParams(); in addLockIconImageView() local
190 lp.height = MATCH_PARENT; in addLockIconImageView()
191 lp.width = MATCH_PARENT; in addLockIconImageView()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DKeyguardStatusBarView.java154 MarginLayoutParams lp = (MarginLayoutParams) mMultiUserAvatar.getLayoutParams(); in onConfigurationChanged() local
155 lp.width = lp.height = getResources().getDimensionPixelSize( in onConfigurationChanged()
157 mMultiUserAvatar.setLayoutParams(lp); in onConfigurationChanged()
189 lp = (MarginLayoutParams) mCarrierLabel.getLayoutParams(); in onConfigurationChanged()
194 lp.setMarginStart(marginStart); in onConfigurationChanged()
196 mCarrierLabel.setLayoutParams(lp); in onConfigurationChanged()
205 ViewGroup.LayoutParams lp = (ViewGroup.LayoutParams) getLayoutParams(); in updateKeyguardStatusBarHeight() local
206 lp.height = getStatusBarHeaderHeightKeyguard(mContext); in updateKeyguardStatusBarHeight()
207 setLayoutParams(lp); in updateKeyguardStatusBarHeight()
262 LinearLayout.LayoutParams lp = in updateSystemIconsLayoutParams() local
[all …]
/frameworks/base/core/tests/coretests/src/android/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()
159 final ViewGroup.LayoutParams lp = new AbsListView.LayoutParams( in button() local
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DSmartReplyView.java264 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
266 && lp.mButtonType == SmartButtonType.ACTION in onMeasure()
268 lp.mNoShowReason = "max-actions-shown"; in onMeasure()
284 lp.mNoShowReason = "line-count-0"; in onMeasure()
290 lp.mNoShowReason = "line-count-3+"; in onMeasure()
300 if (actionsMeasures == null && lp.mButtonType == SmartButtonType.REPLY) { in onMeasure()
339 lp.mNoShowReason = "overflow"; in onMeasure()
351 lp.show = true; in onMeasure()
352 lp.mNoShowReason = "n/a"; in onMeasure()
354 if (lp.mButtonType == SmartButtonType.ACTION) { in onMeasure()
[all …]
/frameworks/base/services/tests/VpnTests/java/com/android/server/net/
DLockdownVpnTrackerTest.java172 NetworkCapabilities nc, LinkProperties lp, boolean blocked) { in callCallbacksForNetworkConnect() argument
175 callback.onLinkPropertiesChanged(network, lp); in callCallbacksForNetworkConnect()
251 final LinkProperties lp = new LinkProperties(TEST_CELL_LP); in testDefaultLPChanged_V4AddLinkAddressV4() local
252 lp.setInterfaceName("rmnet0"); in testDefaultLPChanged_V4AddLinkAddressV4()
253 lp.addLinkAddress(new LinkAddress("192.0.2.3/25")); in testDefaultLPChanged_V4AddLinkAddressV4()
254 doTestDefaultLpChanged(TEST_CELL_LP, lp); in testDefaultLPChanged_V4AddLinkAddressV4()
259 final LinkProperties lp = new LinkProperties(); in testDefaultLPChanged_V4AddLinkAddressV6() local
260 lp.setInterfaceName("rmnet0"); in testDefaultLPChanged_V4AddLinkAddressV6()
261 lp.addLinkAddress(new LinkAddress("192.0.2.3/25")); in testDefaultLPChanged_V4AddLinkAddressV6()
262 final LinkProperties newLp = new LinkProperties(lp); in testDefaultLPChanged_V4AddLinkAddressV6()
[all …]
/frameworks/base/services/core/java/com/android/server/connectivity/
DDefaultNetworkMetrics.java127 boolean validated, LinkProperties lp, NetworkCapabilities nc, in logDefaultNetworkEvent() argument
132 newDefaultNetwork(timeMs, defaultNetwork, score, validated, lp, nc); in logDefaultNetworkEvent()
136 LinkProperties lp, NetworkCapabilities nc) { in logCurrentDefaultNetwork() argument
146 fillLinkInfo(ev, network, lp, nc); in logCurrentDefaultNetwork()
161 LinkProperties lp, NetworkCapabilities nc) { in newDefaultNetwork() argument
166 fillLinkInfo(ev, network, lp, nc); in newDefaultNetwork()
178 private static void fillLinkInfo(DefaultNetworkEvent ev, Network network, LinkProperties lp, in fillLinkInfo() argument
182 ev.ipv4 |= lp.hasIpv4Address() && lp.hasIpv4DefaultRoute(); in fillLinkInfo()
183 ev.ipv6 |= lp.hasGlobalIpv6Address() && lp.hasIpv6DefaultRoute(); in fillLinkInfo()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/additionalviewcontainer/
DAdditionalSystemViewContainer.kt43 val lp = WindowManager.LayoutParams( constant
49 lp.title = "Additional view container of Task=$taskId"
50 lp.setTrustedOverlay()
52 wm?.addView(view, lp)
60 val lp = (view.layoutParams as WindowManager.LayoutParams).apply { in setPosition() constant
64 view.layoutParams = lp in setPosition()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/window/
DStatusBarWindowView.java93 LayoutParams lp = (LayoutParams) child.getLayoutParams(); in applyMargins() local
94 if (lp.rightMargin != mRightInset || lp.leftMargin != mLeftInset in applyMargins()
95 || lp.topMargin != mTopInset) { in applyMargins()
96 lp.rightMargin = mRightInset; in applyMargins()
97 lp.leftMargin = mLeftInset; in applyMargins()
98 lp.topMargin = mTopInset; in applyMargins()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
DQuickStatusBarHeader.java88 ViewGroup.LayoutParams lp = getLayoutParams(); in updateResources() local
90 lp.height = 0; in updateResources()
92 lp.height = WRAP_CONTENT; in updateResources()
94 setLayoutParams(lp); in updateResources()
126 MarginLayoutParams lp = (MarginLayoutParams) view.getLayoutParams(); in setContentMargins() local
127 lp.setMarginStart(marginStart); in setContentMargins()
128 lp.setMarginEnd(marginEnd); in setContentMargins()
129 view.setLayoutParams(lp); in setContentMargins()
DQSFooterView.java115 MarginLayoutParams lp = (MarginLayoutParams) getLayoutParams(); in updateResources() local
116 lp.height = getResources().getDimensionPixelSize(R.dimen.qs_footer_height); in updateResources()
118 lp.leftMargin = sideMargin; in updateResources()
119 lp.rightMargin = sideMargin; in updateResources()
120 lp.bottomMargin = getResources().getDimensionPixelSize(R.dimen.qs_footers_margin_bottom); in updateResources()
121 setLayoutParams(lp); in updateResources()
127 MarginLayoutParams lp = (MarginLayoutParams) mEditButton.getLayoutParams(); in updateEditButtonResources() local
128 lp.height = size; in updateEditButtonResources()
129 lp.width = size; in updateEditButtonResources()
130 mEditButton.setLayoutParams(lp); in updateEditButtonResources()

1234567891011