Home
last modified time | relevance | path

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

1234567891011

/frameworks/support/compat/java/android/support/v4/view/
DMarginLayoutParamsCompat.java41 public static int getMarginStart(ViewGroup.MarginLayoutParams lp) { in getMarginStart() argument
43 return lp.getMarginStart(); in getMarginStart()
45 return lp.leftMargin; in getMarginStart()
60 public static int getMarginEnd(ViewGroup.MarginLayoutParams lp) { in getMarginEnd() argument
62 return lp.getMarginEnd(); in getMarginEnd()
64 return lp.rightMargin; in getMarginEnd()
79 public static void setMarginStart(ViewGroup.MarginLayoutParams lp, int marginStart) { in setMarginStart() argument
81 lp.setMarginStart(marginStart); in setMarginStart()
83 lp.leftMargin = marginStart; in setMarginStart()
98 public static void setMarginEnd(ViewGroup.MarginLayoutParams lp, int marginEnd) { in setMarginEnd() argument
[all …]
/frameworks/base/core/tests/coretests/src/android/preference/
DListPreferenceTest.java26 ListPreference lp = new ListPreference(getContext()); in testListPreferenceSummaryFromEntries() local
27 lp.setEntries(entries); in testListPreferenceSummaryFromEntries()
28 lp.setEntryValues(entryValues); in testListPreferenceSummaryFromEntries()
30 lp.setValue(entryValues[1]); in testListPreferenceSummaryFromEntries()
31 assertTrue(lp.getSummary() == null); in testListPreferenceSummaryFromEntries()
33 lp.setSummary("%1$s"); in testListPreferenceSummaryFromEntries()
34 assertEquals(entries[1], lp.getSummary()); in testListPreferenceSummaryFromEntries()
36 lp.setValue(entryValues[2]); in testListPreferenceSummaryFromEntries()
37 assertEquals(entries[2], lp.getSummary()); in testListPreferenceSummaryFromEntries()
39 lp.setSummary(null); in testListPreferenceSummaryFromEntries()
[all …]
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
DLinearLayoutCompat.java299 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
300 final int top = child.getTop() - lp.topMargin - mDividerHeight; in drawDividersVertical()
312 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
313 bottom = child.getBottom() + lp.bottomMargin; in drawDividersVertical()
327 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
330 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
332 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
349 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
351 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
353 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
[all …]
DActionMenuView.java168 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
169 lp.leftMargin = lp.rightMargin = 0; in onMeasure()
225 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasureExactFormat() local
226 lp.expanded = false; in onMeasureExactFormat()
227 lp.extraPixels = 0; in onMeasureExactFormat()
228 lp.cellsUsed = 0; in onMeasureExactFormat()
229 lp.expandable = false; in onMeasureExactFormat()
230 lp.leftMargin = 0; in onMeasureExactFormat()
231 lp.rightMargin = 0; in onMeasureExactFormat()
232 lp.preventEdgeOffset = isGeneratedItem && ((ActionMenuItemView) child).hasText(); in onMeasureExactFormat()
[all …]
DToolbar.java1049 final LayoutParams lp = generateDefaultLayoutParams(); in ensureMenuView() local
1050 lp.gravity = GravityCompat.END | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureMenuView()
1051 mMenuView.setLayoutParams(lp); in ensureMenuView()
1362 final LayoutParams lp = generateDefaultLayoutParams(); in ensureNavButtonView() local
1363 lp.gravity = GravityCompat.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureNavButtonView()
1364 mNavButtonView.setLayoutParams(lp); in ensureNavButtonView()
1374 final LayoutParams lp = generateDefaultLayoutParams(); in ensureCollapseButtonView() local
1375 lp.gravity = GravityCompat.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureCollapseButtonView()
1376 lp.mViewType = LayoutParams.EXPANDED; in ensureCollapseButtonView()
1377 mCollapseButtonView.setLayoutParams(lp); in ensureCollapseButtonView()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
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.java106 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
107 lp.hide = true; in onMeasure()
121 LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams(); in onMeasure() local
136 int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin + in onMeasure()
137 lp.bottomMargin + spacing); in onMeasure()
147 lp.hide = false; in onMeasure()
162 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure()
164 if (child.getVisibility() == GONE || lp.hide) { in onMeasure()
179 mPaddingLeft + mPaddingRight + lp.leftMargin + lp.rightMargin, in onMeasure()
180 lp.width); in onMeasure()
[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 …]
DNotificationActionListLayout.java117 MarginLayoutParams lp = (MarginLayoutParams) c.getLayoutParams(); in onMeasure() local
134 usedWidth += c.getMeasuredWidth() + lp.rightMargin + lp.leftMargin; in onMeasure()
142 MarginLayoutParams lp = (MarginLayoutParams) lastNotGoneChild.getLayoutParams(); in onMeasure() local
145 usedWidth -= lastNotGoneChild.getMeasuredWidth() + lp.rightMargin + lp.leftMargin; in onMeasure()
148 int originalWidth = lp.width; in onMeasure()
149 lp.width = LayoutParams.MATCH_PARENT; in onMeasure()
152 lp.width = originalWidth; in onMeasure()
154 usedWidth += lastNotGoneChild.getMeasuredWidth() + lp.rightMargin + lp.leftMargin; in onMeasure()
244 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in onLayout() local
247 + lp.topMargin - lp.bottomMargin; in onLayout()
[all …]
/frameworks/base/core/java/android/widget/
DFrameLayout.java186 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
188 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin); in onMeasure()
190 child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin); in onMeasure()
193 if (lp.width == LayoutParams.MATCH_PARENT || in onMeasure()
194 lp.height == LayoutParams.MATCH_PARENT) { in onMeasure()
224 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in onMeasure() local
227 if (lp.width == LayoutParams.MATCH_PARENT) { in onMeasure()
230 - lp.leftMargin - lp.rightMargin); in onMeasure()
236 lp.leftMargin + lp.rightMargin, in onMeasure()
237 lp.width); in onMeasure()
[all …]
DLinearLayout.java409 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
410 final int top = child.getTop() - lp.topMargin - mDividerHeight; in drawDividersVertical()
422 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
423 bottom = child.getBottom() + lp.bottomMargin; in drawDividersVertical()
450 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
453 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
455 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
472 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
474 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
476 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
[all …]
DActionMenuView.java165 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
166 lp.leftMargin = lp.rightMargin = 0; in onMeasure()
222 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasureExactFormat() local
223 lp.expanded = false; in onMeasureExactFormat()
224 lp.extraPixels = 0; in onMeasureExactFormat()
225 lp.cellsUsed = 0; in onMeasureExactFormat()
226 lp.expandable = false; in onMeasureExactFormat()
227 lp.leftMargin = 0; in onMeasureExactFormat()
228 lp.rightMargin = 0; in onMeasureExactFormat()
229 lp.preventEdgeOffset = isGeneratedItem && ((ActionMenuItemView) child).hasText(); in onMeasureExactFormat()
[all …]
DToolbar.java1063 final LayoutParams lp = generateDefaultLayoutParams(); in ensureMenuView() local
1064 lp.gravity = Gravity.END | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureMenuView()
1065 mMenuView.setLayoutParams(lp); in ensureMenuView()
1375 final LayoutParams lp = generateDefaultLayoutParams(); in ensureNavButtonView() local
1376 lp.gravity = Gravity.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureNavButtonView()
1377 mNavButtonView.setLayoutParams(lp); in ensureNavButtonView()
1386 final LayoutParams lp = generateDefaultLayoutParams(); in ensureCollapseButtonView() local
1387 lp.gravity = Gravity.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureCollapseButtonView()
1388 lp.mViewType = LayoutParams.EXPANDED; in ensureCollapseButtonView()
1389 mCollapseButtonView.setLayoutParams(lp); in ensureCollapseButtonView()
[all …]
/frameworks/base/core/tests/coretests/src/android/net/
DLinkPropertiesTest.java252 private void assertAllRoutesHaveInterface(String iface, LinkProperties lp) { in assertAllRoutesHaveInterface() argument
253 for (RouteInfo r : lp.getRoutes()) { in assertAllRoutesHaveInterface()
265 LinkProperties lp = new LinkProperties(); in testRouteInterfaces() local
267 assertTrue(lp.addRoute(r)); in testRouteInterfaces()
268 assertEquals(1, lp.getRoutes().size()); in testRouteInterfaces()
269 assertAllRoutesHaveInterface(null, lp); in testRouteInterfaces()
272 assertFalse(lp.addRoute(r)); in testRouteInterfaces()
273 assertEquals(1, lp.getRoutes().size()); in testRouteInterfaces()
278 lp.addRoute(r); in testRouteInterfaces()
283 lp.setInterfaceName("rmnet0"); in testRouteInterfaces()
[all …]
/frameworks/base/core/java/android/inputmethodservice/
DSoftInputWindow.java50 WindowManager.LayoutParams lp = getWindow().getAttributes(); in setToken() local
51 lp.token = token; in setToken()
52 getWindow().setAttributes(lp); in setToken()
112 WindowManager.LayoutParams lp = getWindow().getAttributes(); in setGravity() local
113 lp.gravity = gravity; in setGravity()
114 updateWidthHeight(lp); in setGravity()
115 getWindow().setAttributes(lp); in setGravity()
122 private void updateWidthHeight(WindowManager.LayoutParams lp) { in updateWidthHeight() argument
123 if (lp.gravity == Gravity.TOP || lp.gravity == Gravity.BOTTOM) { in updateWidthHeight()
124 lp.width = WindowManager.LayoutParams.MATCH_PARENT; in updateWidthHeight()
[all …]
/frameworks/support/wear/src/android/support/wear/widget/
DBoxInsetLayout.java168 LayoutParams lp = (BoxInsetLayout.LayoutParams) child.getLayoutParams(); in onMeasure() local
175 if ((lp.boxedEdges & LayoutParams.BOX_LEFT) == 0) { in onMeasure()
176 marginLeft = lp.leftMargin; in onMeasure()
178 if ((lp.boxedEdges & LayoutParams.BOX_RIGHT) == 0) { in onMeasure()
179 marginRight = lp.rightMargin; in onMeasure()
181 if ((lp.boxedEdges & LayoutParams.BOX_TOP) == 0) { in onMeasure()
182 marginTop = lp.topMargin; in onMeasure()
184 if ((lp.boxedEdges & LayoutParams.BOX_BOTTOM) == 0) { in onMeasure()
185 marginBottom = lp.bottomMargin; in onMeasure()
189 marginLeft = lp.leftMargin; in onMeasure()
[all …]
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DDetailsOverviewLogoPresenter.java95 ViewGroup.LayoutParams lp = view.getLayoutParams(); in onCreateViewHolder() local
96 vh.setSizeFromDrawableIntrinsic(lp.width == ViewGroup.LayoutParams.WRAP_CONTENT in onCreateViewHolder()
97 && lp.height == ViewGroup.LayoutParams.WRAP_CONTENT); in onCreateViewHolder()
142 ViewGroup.LayoutParams lp = imageView.getLayoutParams(); in onBindViewHolder() local
143 lp.width = row.getImageDrawable().getIntrinsicWidth(); in onBindViewHolder()
144 lp.height = row.getImageDrawable().getIntrinsicHeight(); in onBindViewHolder()
148 if (lp.width > imageView.getMaxWidth()) { in onBindViewHolder()
149 maxScaleWidth = imageView.getMaxWidth() / (float) lp.width; in onBindViewHolder()
154 if (lp.height > imageView.getMaxHeight()) { in onBindViewHolder()
155 maxScaleHeight = imageView.getMaxHeight() / (float) lp.height; in onBindViewHolder()
[all …]
DThumbsBar.java89 LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams(); in setThumbSize() local
91 if (lp.height != height) { in setThumbSize()
92 lp.height = height; in setThumbSize()
95 if (lp.width != width) { in setThumbSize()
96 lp.width = width; in setThumbSize()
100 child.setLayoutParams(lp); in setThumbSize()
116 LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams(); in setHeroThumbSize() local
118 if (lp.height != height) { in setHeroThumbSize()
119 lp.height = height; in setHeroThumbSize()
122 if (lp.width != width) { in setHeroThumbSize()
[all …]
/frameworks/support/design/src/android/support/design/widget/
DCoordinatorLayout.java380 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in resetTouchBehaviors() local
381 final Behavior b = lp.getBehavior(); in resetTouchBehaviors()
397 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in resetTouchBehaviors() local
398 lp.resetTouchBehaviorTracking(); in resetTouchBehaviors()
438 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in performIntercept() local
439 final Behavior b = lp.getBehavior(); in performIntercept()
478 final boolean wasBlocking = lp.didBlockInteraction(); in performIntercept()
479 final boolean isBlocking = lp.isBlockingInteractionBelow(this, child); in performIntercept()
528 final LayoutParams lp = (LayoutParams) mBehaviorTouchView.getLayoutParams(); in onTouchEvent() local
529 final Behavior b = lp.getBehavior(); in onTouchEvent()
[all …]
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
DTestedFrameLayout.java44 FullControlLayoutParams lp = (FullControlLayoutParams) recyclerView.getLayoutParams(); in onMeasure() local
45 if (lp.wSpec == null && lp.hSpec == null) { in onMeasure()
50 if (lp.wSpec != null) { in onMeasure()
51 childWidthMeasureSpec = lp.wSpec; in onMeasure()
52 } else if (lp.width == LayoutParams.MATCH_PARENT) { in onMeasure()
54 - lp.leftMargin - lp.rightMargin); in onMeasure()
58 lp.leftMargin + lp.rightMargin, lp.width); in onMeasure()
62 if (lp.hSpec != null) { in onMeasure()
63 childHeightMeasureSpec = lp.hSpec; in onMeasure()
64 } else if (lp.height == LayoutParams.MATCH_PARENT) { in onMeasure()
[all …]
/frameworks/base/services/core/java/com/android/server/connectivity/tethering/
DIPv6TetheringCoordinator.java162 final LinkProperties lp = getInterfaceIPv6LinkProperties(sm); in updateIPv6TetheringInterfaces() local
163 sm.sendMessage(TetherInterfaceStateMachine.CMD_IPV6_TETHER_UPDATE, 0, 0, lp); in updateIPv6TetheringInterfaces()
194 final LinkProperties lp = getIPv6OnlyLinkProperties( in getInterfaceIPv6LinkProperties() local
196 if (lp.hasIPv6DefaultRoute() && lp.hasGlobalIPv6Address()) { in getInterfaceIPv6LinkProperties()
197 return lp; in getInterfaceIPv6LinkProperties()
275 private static LinkProperties getIPv6OnlyLinkProperties(LinkProperties lp) { in getIPv6OnlyLinkProperties() argument
277 if (lp == null) { in getIPv6OnlyLinkProperties()
284 v6only.setInterfaceName(lp.getInterfaceName()); in getIPv6OnlyLinkProperties()
286 v6only.setMtu(lp.getMtu()); in getIPv6OnlyLinkProperties()
288 for (LinkAddress linkAddr : lp.getLinkAddresses()) { in getIPv6OnlyLinkProperties()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DKeyguardStatusBarView.java104 MarginLayoutParams lp = (MarginLayoutParams) mMultiUserAvatar.getLayoutParams(); in onConfigurationChanged() local
105 lp.width = lp.height = getResources().getDimensionPixelSize( in onConfigurationChanged()
107 mMultiUserAvatar.setLayoutParams(lp); in onConfigurationChanged()
109 lp = (MarginLayoutParams) mMultiUserSwitch.getLayoutParams(); in onConfigurationChanged()
110 lp.width = getResources().getDimensionPixelSize( in onConfigurationChanged()
112 lp.setMarginEnd(getResources().getDimensionPixelSize( in onConfigurationChanged()
114 mMultiUserSwitch.setLayoutParams(lp); in onConfigurationChanged()
116 lp = (MarginLayoutParams) mSystemIconsSuperContainer.getLayoutParams(); in onConfigurationChanged()
117 lp.height = getResources().getDimensionPixelSize( in onConfigurationChanged()
119 lp.setMarginStart(getResources().getDimensionPixelSize( in onConfigurationChanged()
[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/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/support/core-ui/java/android/support/v4/widget/
DSlidingPaneLayout.java507 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
510 lp.dimWhenOffset = false; in onMeasure()
514 if (lp.weight > 0) { in onMeasure()
515 weightSum += lp.weight; in onMeasure()
519 if (lp.width == 0) continue; in onMeasure()
523 final int horizontalMargin = lp.leftMargin + lp.rightMargin; in onMeasure()
524 if (lp.width == LayoutParams.WRAP_CONTENT) { in onMeasure()
527 } else if (lp.width == LayoutParams.MATCH_PARENT) { in onMeasure()
531 childWidthSpec = MeasureSpec.makeMeasureSpec(lp.width, MeasureSpec.EXACTLY); in onMeasure()
535 if (lp.height == LayoutParams.WRAP_CONTENT) { in onMeasure()
[all …]

1234567891011