Home
last modified time | relevance | path

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

123456789

/frameworks/support/v4/java/android/support/v4/view/
DMarginLayoutParamsCompat.java29 int getMarginStart(ViewGroup.MarginLayoutParams lp); in getMarginStart() argument
30 int getMarginEnd(ViewGroup.MarginLayoutParams lp); in getMarginEnd() argument
31 void setMarginStart(ViewGroup.MarginLayoutParams lp, int marginStart); in setMarginStart() argument
32 void setMarginEnd(ViewGroup.MarginLayoutParams lp, int marginEnd); in setMarginEnd() argument
33 boolean isMarginRelative(ViewGroup.MarginLayoutParams lp); in isMarginRelative() argument
34 int getLayoutDirection(ViewGroup.MarginLayoutParams lp); in getLayoutDirection() argument
35 void setLayoutDirection(ViewGroup.MarginLayoutParams lp, int layoutDirection); in setLayoutDirection() argument
36 void resolveLayoutDirection(ViewGroup.MarginLayoutParams lp, int layoutDirection); in resolveLayoutDirection() argument
42 public int getMarginStart(ViewGroup.MarginLayoutParams lp) { in getMarginStart() argument
43 return lp.leftMargin; in getMarginStart()
[all …]
/frameworks/support/v4/jellybean-mr1/android/support/v4/view/
DMarginLayoutParamsCompatJellybeanMr1.java23 public static int getMarginStart(ViewGroup.MarginLayoutParams lp) { in getMarginStart() argument
24 return lp.getMarginStart(); in getMarginStart()
27 public static int getMarginEnd(ViewGroup.MarginLayoutParams lp) { in getMarginEnd() argument
28 return lp.getMarginEnd(); in getMarginEnd()
31 public static void setMarginStart(ViewGroup.MarginLayoutParams lp, int marginStart) { in setMarginStart() argument
32 lp.setMarginStart(marginStart); in setMarginStart()
35 public static void setMarginEnd(ViewGroup.MarginLayoutParams lp, int marginEnd) { in setMarginEnd() argument
36 lp.setMarginEnd(marginEnd); in setMarginEnd()
39 public static boolean isMarginRelative(ViewGroup.MarginLayoutParams lp) { in isMarginRelative() argument
40 return lp.isMarginRelative(); in isMarginRelative()
[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.java295 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
296 final int top = child.getTop() - lp.topMargin - mDividerHeight; in drawDividersVertical()
308 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
309 bottom = child.getBottom() + lp.bottomMargin; in drawDividersVertical()
323 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
326 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
328 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
345 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
347 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
349 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
[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 …]
DToolbar.java1046 final LayoutParams lp = generateDefaultLayoutParams(); in ensureMenuView() local
1047 lp.gravity = GravityCompat.END | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureMenuView()
1048 mMenuView.setLayoutParams(lp); in ensureMenuView()
1357 final LayoutParams lp = generateDefaultLayoutParams(); in ensureNavButtonView() local
1358 lp.gravity = GravityCompat.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureNavButtonView()
1359 mNavButtonView.setLayoutParams(lp); in ensureNavButtonView()
1369 final LayoutParams lp = generateDefaultLayoutParams(); in ensureCollapseButtonView() local
1370 lp.gravity = GravityCompat.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureCollapseButtonView()
1371 lp.mViewType = LayoutParams.EXPANDED; in ensureCollapseButtonView()
1372 mCollapseButtonView.setLayoutParams(lp); in ensureCollapseButtonView()
[all …]
/frameworks/base/core/tests/coretests/src/android/net/
DLinkPropertiesTest.java247 private void assertAllRoutesHaveInterface(String iface, LinkProperties lp) { in assertAllRoutesHaveInterface() argument
248 for (RouteInfo r : lp.getRoutes()) { in assertAllRoutesHaveInterface()
260 LinkProperties lp = new LinkProperties(); in testRouteInterfaces() local
262 assertTrue(lp.addRoute(r)); in testRouteInterfaces()
263 assertEquals(1, lp.getRoutes().size()); in testRouteInterfaces()
264 assertAllRoutesHaveInterface(null, lp); in testRouteInterfaces()
267 assertFalse(lp.addRoute(r)); in testRouteInterfaces()
268 assertEquals(1, lp.getRoutes().size()); in testRouteInterfaces()
273 lp.addRoute(r); in testRouteInterfaces()
278 lp.setInterfaceName("rmnet0"); in testRouteInterfaces()
[all …]
/frameworks/base/core/java/android/widget/
DLinearLayout.java364 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
365 final int top = child.getTop() - lp.topMargin - mDividerHeight; in drawDividersVertical()
377 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
378 bottom = child.getBottom() + lp.bottomMargin; in drawDividersVertical()
405 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
408 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
410 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
427 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
429 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
431 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
[all …]
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 …]
DActionMenuView.java164 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
165 lp.leftMargin = lp.rightMargin = 0; in onMeasure()
221 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasureExactFormat() local
222 lp.expanded = false; in onMeasureExactFormat()
223 lp.extraPixels = 0; in onMeasureExactFormat()
224 lp.cellsUsed = 0; in onMeasureExactFormat()
225 lp.expandable = false; in onMeasureExactFormat()
226 lp.leftMargin = 0; in onMeasureExactFormat()
227 lp.rightMargin = 0; in onMeasureExactFormat()
228 lp.preventEdgeOffset = isGeneratedItem && ((ActionMenuItemView) child).hasText(); in onMeasureExactFormat()
[all …]
DToolbar.java1041 final LayoutParams lp = generateDefaultLayoutParams(); in ensureMenuView() local
1042 lp.gravity = Gravity.END | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureMenuView()
1043 mMenuView.setLayoutParams(lp); in ensureMenuView()
1351 final LayoutParams lp = generateDefaultLayoutParams(); in ensureNavButtonView() local
1352 lp.gravity = Gravity.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureNavButtonView()
1353 mNavButtonView.setLayoutParams(lp); in ensureNavButtonView()
1362 final LayoutParams lp = generateDefaultLayoutParams(); in ensureCollapseButtonView() local
1363 lp.gravity = Gravity.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureCollapseButtonView()
1364 lp.mViewType = LayoutParams.EXPANDED; in ensureCollapseButtonView()
1365 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.java109 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
110 lp.hide = true; in onMeasure()
123 LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams(); in onMeasure() local
135 int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin + in onMeasure()
136 lp.bottomMargin + (first ? 0 : mSpacing)); in onMeasure()
141 lp.hide = false; in onMeasure()
152 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
154 if (child.getVisibility() == GONE || lp.hide) { in onMeasure()
174 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin in onMeasure()
205 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onLayout() local
[all …]
DNotificationActionListLayout.java108 MarginLayoutParams lp = (MarginLayoutParams) c.getLayoutParams(); in onMeasure() local
125 usedWidth += c.getMeasuredWidth() + lp.rightMargin + lp.leftMargin; in onMeasure()
133 MarginLayoutParams lp = (MarginLayoutParams) lastNotGoneChild.getLayoutParams(); in onMeasure() local
136 usedWidth -= lastNotGoneChild.getMeasuredWidth() + lp.rightMargin + lp.leftMargin; in onMeasure()
139 int originalWidth = lp.width; in onMeasure()
140 lp.width = LayoutParams.MATCH_PARENT; in onMeasure()
143 lp.width = originalWidth; in onMeasure()
145 usedWidth += lastNotGoneChild.getMeasuredWidth() + lp.rightMargin + lp.leftMargin; in onMeasure()
231 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in onLayout() local
234 + lp.topMargin - lp.bottomMargin; in onLayout()
[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/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DKeyguardStatusBarView.java84 MarginLayoutParams lp = (MarginLayoutParams) mMultiUserAvatar.getLayoutParams(); in onConfigurationChanged() local
85 lp.width = lp.height = getResources().getDimensionPixelSize( in onConfigurationChanged()
87 mMultiUserAvatar.setLayoutParams(lp); in onConfigurationChanged()
89 lp = (MarginLayoutParams) mMultiUserSwitch.getLayoutParams(); in onConfigurationChanged()
90 lp.width = getResources().getDimensionPixelSize( in onConfigurationChanged()
92 lp.setMarginEnd(getResources().getDimensionPixelSize( in onConfigurationChanged()
94 mMultiUserSwitch.setLayoutParams(lp); in onConfigurationChanged()
96 lp = (MarginLayoutParams) mSystemIconsSuperContainer.getLayoutParams(); in onConfigurationChanged()
97 lp.height = getResources().getDimensionPixelSize( in onConfigurationChanged()
99 lp.setMarginStart(getResources().getDimensionPixelSize( in onConfigurationChanged()
[all …]
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DDetailsOverviewLogoPresenter.java98 ViewGroup.LayoutParams lp = view.getLayoutParams(); in onCreateViewHolder() local
99 vh.setSizeFromDrawableIntrinsic(lp.width == ViewGroup.LayoutParams.WRAP_CONTENT && in onCreateViewHolder()
100 lp.width == ViewGroup.LayoutParams.WRAP_CONTENT); in onCreateViewHolder()
145 ViewGroup.LayoutParams lp = imageView.getLayoutParams(); in onBindViewHolder() local
146 lp.width = row.getImageDrawable().getIntrinsicWidth(); in onBindViewHolder()
147 lp.height = row.getImageDrawable().getIntrinsicHeight(); in onBindViewHolder()
151 if (lp.width > imageView.getMaxWidth()) { in onBindViewHolder()
152 maxScaleWidth = imageView.getMaxWidth() / (float) lp.width; in onBindViewHolder()
157 if (lp.height > imageView.getMaxHeight()) { in onBindViewHolder()
158 maxScaleHeight = imageView.getMaxHeight() / (float) lp.height; in onBindViewHolder()
[all …]
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
DTestedFrameLayout.java48 FullControlLayoutParams lp = (FullControlLayoutParams) recyclerView.getLayoutParams(); in onMeasure() local
49 if (lp.wSpec == null && lp.hSpec == null) { in onMeasure()
54 if (lp.wSpec != null) { in onMeasure()
55 childWidthMeasureSpec = lp.wSpec; in onMeasure()
56 } else if (lp.width == LayoutParams.MATCH_PARENT) { in onMeasure()
58 - lp.leftMargin - lp.rightMargin); in onMeasure()
62 lp.leftMargin + lp.rightMargin, lp.width); in onMeasure()
66 if (lp.hSpec != null) { in onMeasure()
67 childHeightMeasureSpec = lp.hSpec; in onMeasure()
68 } else if (lp.height == LayoutParams.MATCH_PARENT) { in onMeasure()
[all …]
DStaggeredGridLayoutManagerWrapContentTest.java62 TestedFrameLayout.FullControlLayoutParams lp = in testSimple() local
76 layoutAndCheck(lp, adapter, expected, 60, 20); in testSimple()
82 TestedFrameLayout.FullControlLayoutParams lp = in testSimpleHorizontal() local
96 layoutAndCheck(lp, adapter, expected, 20, 60); in testSimpleHorizontal()
101 TestedFrameLayout.FullControlLayoutParams lp = in testUnspecifiedWidth() local
103 lp.wSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); in testUnspecifiedWidth()
116 layoutAndCheck(lp, adapter, expected, 6000, 20); in testUnspecifiedWidth()
121 TestedFrameLayout.FullControlLayoutParams lp = in testUnspecifiedHeight() local
123 lp.hSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); in testUnspecifiedHeight()
136 layoutAndCheck(lp, adapter, expected, 60, 5500); in testUnspecifiedHeight()
/frameworks/support/design/src/android/support/design/widget/
DCoordinatorLayout.java373 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in resetTouchBehaviors() local
374 lp.resetTouchBehaviorTracking(); in resetTouchBehaviors()
414 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in performIntercept() local
415 final Behavior b = lp.getBehavior(); in performIntercept()
454 final boolean wasBlocking = lp.didBlockInteraction(); in performIntercept()
455 final boolean isBlocking = lp.isBlockingInteractionBelow(this, child); in performIntercept()
504 final LayoutParams lp = (LayoutParams) mBehaviorTouchView.getLayoutParams(); in onTouchEvent() local
505 final Behavior b = lp.getBehavior(); in onTouchEvent()
627 final LayoutParams lp = getResolvedLayoutParams(child); in prepareChildren() local
628 lp.findAnchorView(this, child); in prepareChildren()
[all …]
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/
DGridLayoutManager.java145 ViewGroup.LayoutParams lp = host.getLayoutParams(); in onInitializeAccessibilityNodeInfoForItem() local
146 if (!(lp instanceof LayoutParams)) { in onInitializeAccessibilityNodeInfoForItem()
150 LayoutParams glp = (LayoutParams) lp; in onInitializeAccessibilityNodeInfoForItem()
191 final LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams(); in cachePreLayoutSpanMapping() local
192 final int viewPosition = lp.getViewLayoutPosition(); in cachePreLayoutSpanMapping()
193 mPreLayoutSpanSizeCache.put(viewPosition, lp.getSpanSize()); in cachePreLayoutSpanMapping()
194 mPreLayoutSpanIndexCache.put(viewPosition, lp.getSpanIndex()); in cachePreLayoutSpanMapping()
241 public RecyclerView.LayoutParams generateLayoutParams(ViewGroup.LayoutParams lp) { in generateLayoutParams() argument
242 if (lp instanceof ViewGroup.MarginLayoutParams) { in generateLayoutParams()
243 return new LayoutParams((ViewGroup.MarginLayoutParams) lp); in generateLayoutParams()
[all …]
DStaggeredGridLayoutManager.java348 LayoutParams lp = (LayoutParams) child.getLayoutParams(); in hasGapsToFix()
349 if (mSpansToCheck.get(lp.mSpan.mIndex)) { in hasGapsToFix()
350 if (checkSpanForGap(lp.mSpan)) { in hasGapsToFix()
353 mSpansToCheck.clear(lp.mSpan.mIndex); in hasGapsToFix()
355 if (lp.mFullSpan) { in hasGapsToFix()
383 if (lp.mSpan.mIndex - nextLp.mSpan.mIndex < 0 != preferredSpanDir < 0) { in hasGapsToFix()
398 final LayoutParams lp = span.getLayoutParams(endView);
399 return !lp.mFullSpan;
404 final LayoutParams lp = span.getLayoutParams(startView);
405 return !lp.mFullSpan;
[all …]
/frameworks/support/v4/java/android/support/v4/widget/
DSlidingPaneLayout.java510 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
513 lp.dimWhenOffset = false; in onMeasure()
517 if (lp.weight > 0) { in onMeasure()
518 weightSum += lp.weight; in onMeasure()
522 if (lp.width == 0) continue; in onMeasure()
526 final int horizontalMargin = lp.leftMargin + lp.rightMargin; in onMeasure()
527 if (lp.width == LayoutParams.WRAP_CONTENT) { in onMeasure()
530 } else if (lp.width == LayoutParams.FILL_PARENT) { in onMeasure()
534 childWidthSpec = MeasureSpec.makeMeasureSpec(lp.width, MeasureSpec.EXACTLY); in onMeasure()
538 if (lp.height == LayoutParams.WRAP_CONTENT) { in onMeasure()
[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()

123456789