Searched refs:lp (Results 1 - 25 of 283) sorted by relevance

1234567891011>>

/frameworks/base/core/tests/coretests/src/android/preference/
H A DListPreferenceTest.java28 ListPreference lp = new ListPreference(getContext());
29 lp.setEntries(entries);
30 lp.setEntryValues(entryValues);
32 lp.setValue(entryValues[1]);
33 assertTrue(lp.getSummary() == null);
35 lp.setSummary("%1$s");
36 assertEquals(entries[1], lp.getSummary());
38 lp.setValue(entryValues[2]);
39 assertEquals(entries[2], lp.getSummary());
41 lp
[all...]
/frameworks/support/compat/src/main/java/androidx/core/view/
H A DMarginLayoutParamsCompat.java38 * @param lp LayoutParams to query
41 public static int getMarginStart(ViewGroup.MarginLayoutParams lp) { argument
43 return lp.getMarginStart();
45 return lp.leftMargin;
57 * @param lp LayoutParams to query
60 public static int getMarginEnd(ViewGroup.MarginLayoutParams lp) { argument
62 return lp.getMarginEnd();
64 return lp.rightMargin;
76 * @param lp LayoutParams to query
79 public static void setMarginStart(ViewGroup.MarginLayoutParams lp, in argument
98 setMarginEnd(ViewGroup.MarginLayoutParams lp, int marginEnd) argument
111 isMarginRelative(ViewGroup.MarginLayoutParams lp) argument
125 getLayoutDirection(ViewGroup.MarginLayoutParams lp) argument
149 setLayoutDirection(ViewGroup.MarginLayoutParams lp, int layoutDirection) argument
159 resolveLayoutDirection(ViewGroup.MarginLayoutParams lp, int layoutDirection) argument
[all...]
/frameworks/support/leanback/src/main/java/androidx/leanback/widget/
H A DDetailsOverviewLogoPresenter.java96 ViewGroup.LayoutParams lp = view.getLayoutParams();
97 vh.setSizeFromDrawableIntrinsic(lp.width == ViewGroup.LayoutParams.WRAP_CONTENT
98 && lp.height == ViewGroup.LayoutParams.WRAP_CONTENT);
143 ViewGroup.LayoutParams lp = imageView.getLayoutParams();
144 lp.width = row.getImageDrawable().getIntrinsicWidth();
145 lp.height = row.getImageDrawable().getIntrinsicHeight();
149 if (lp.width > imageView.getMaxWidth()) {
150 maxScaleWidth = imageView.getMaxWidth() / (float) lp.width;
155 if (lp.height > imageView.getMaxHeight()) {
156 maxScaleHeight = imageView.getMaxHeight() / (float) lp
[all...]
H A DThumbsBar.java90 LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams();
92 if (lp.height != height) {
93 lp.height = height;
96 if (lp.width != width) {
97 lp.width = width;
101 child.setLayoutParams(lp);
117 LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams();
119 if (lp.height != height) {
120 lp.height = height;
123 if (lp
[all...]
H A DBrowseRowsFrameLayout.java51 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();
53 getPaddingLeft() + getPaddingRight() + widthUsed, lp.width);
55 getPaddingTop() + getPaddingBottom() + heightUsed, lp.height);
/frameworks/base/tests/net/java/com/android/server/connectivity/
H A DDnsManagerTest.java102 LinkProperties lp = new LinkProperties();
103 lp.setInterfaceName(TEST_IFACENAME);
104 lp.addDnsServer(InetAddress.getByName("3.3.3.3"));
105 lp.addDnsServer(InetAddress.getByName("4.4.4.4"));
108 mDnsManager.setDnsConfigurationForNetwork(TEST_NETID, lp, IS_DEFAULT);
109 mDnsManager.setDnsConfigurationForNetwork(TEST_NETID_ALTERNATE, lp, NOT_DEFAULT);
113 LinkProperties fixedLp = new LinkProperties(lp);
117 fixedLp = new LinkProperties(lp);
125 lp.addLinkAddress(new LinkAddress("192.0.2.4/24"));
126 lp
[all...]
/frameworks/base/core/java/android/inputmethodservice/
H A DSoftInputWindow.java50 WindowManager.LayoutParams lp = getWindow().getAttributes();
51 lp.token = token;
52 getWindow().setAttributes(lp);
112 WindowManager.LayoutParams lp = getWindow().getAttributes();
113 lp.gravity = gravity;
114 updateWidthHeight(lp);
115 getWindow().setAttributes(lp);
122 private void updateWidthHeight(WindowManager.LayoutParams lp) { argument
123 if (lp.gravity == Gravity.TOP || lp
[all...]
/frameworks/base/core/java/com/android/internal/widget/
H A DDialogViewAnimator.java57 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
58 final boolean matchWidth = lp.width == LayoutParams.MATCH_PARENT;
59 final boolean matchHeight = lp.height == LayoutParams.MATCH_PARENT;
72 + lp.leftMargin + lp.rightMargin);
78 + lp.topMargin + lp.bottomMargin);
110 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();
113 if (lp.width == LayoutParams.MATCH_PARENT) {
116 - lp
[all...]
H A DMessagingLinearLayout.java85 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
86 lp.hide = true;
99 LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams();
112 int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin +
113 lp.bottomMargin + spacing);
125 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin
127 lp.hide = false;
164 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
172 childLeft = childRight - childWidth - lp
227 generateLayoutParams(ViewGroup.LayoutParams lp) argument
[all...]
/frameworks/base/tests/SurfaceComposition/src/android/surfacecomposition/
H A DCustomLayout.java44 CustomLayout.LayoutParams lp = (CustomLayout.LayoutParams) child.getLayoutParams();
45 child.layout(lp.mLeft, lp.mTop, lp.mRight, lp.mBottom);
/frameworks/av/packages/MediaComponents/src/com/android/widget/
H A DBaseLayout.java60 public LayoutParams generateLayoutParams_impl(LayoutParams lp) { argument
61 if (lp instanceof MarginLayoutParams) {
62 return lp;
64 return new MarginLayoutParams(lp);
85 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();
87 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin);
89 child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin);
92 if (lp
[all...]
/frameworks/support/media-widget/src/main/java/androidx/media/widget/
H A DBaseLayout.java72 public LayoutParams generateLayoutParams(LayoutParams lp) { argument
73 if (lp instanceof MarginLayoutParams) {
74 return lp;
76 return new MarginLayoutParams(lp);
97 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();
99 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin);
101 child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin);
104 if (lp
[all...]
/frameworks/support/wear/src/main/java/androidx/wear/widget/
H A DBoxInsetLayout.java149 LayoutParams lp = (BoxInsetLayout.LayoutParams) child.getLayoutParams();
156 if ((lp.boxedEdges & LayoutParams.BOX_LEFT) == 0) {
157 marginLeft = lp.leftMargin;
159 if ((lp.boxedEdges & LayoutParams.BOX_RIGHT) == 0) {
160 marginRight = lp.rightMargin;
162 if ((lp.boxedEdges & LayoutParams.BOX_TOP) == 0) {
163 marginTop = lp.topMargin;
165 if ((lp.boxedEdges & LayoutParams.BOX_BOTTOM) == 0) {
166 marginBottom = lp.bottomMargin;
170 marginLeft = lp
342 calculateChildLeftMargin(LayoutParams lp, int horizontalGravity, int desiredMinInset) argument
352 calculateChildRightMargin(LayoutParams lp, int horizontalGravity, int desiredMinInset) argument
362 calculateChildTopMargin(LayoutParams lp, int verticalGravity, int desiredMinInset) argument
371 calculateChildBottomMargin(LayoutParams lp, int verticalGravity, int desiredMinInset) argument
[all...]
/frameworks/support/v7/appcompat/src/main/java/androidx/appcompat/widget/
H A DLinearLayoutCompat.java301 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
302 final int top = child.getTop() - lp.topMargin - mDividerHeight;
314 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
315 bottom = child.getBottom() + lp.bottomMargin;
329 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
332 position = child.getRight() + lp.rightMargin;
334 position = child.getLeft() - lp.leftMargin - mDividerWidth;
351 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
353 position = child.getLeft() - lp.leftMargin - mDividerWidth;
355 position = child.getRight() + lp
[all...]
H A DActionMenuView.java169 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
170 lp.leftMargin = lp.rightMargin = 0;
226 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
227 lp.expanded = false;
228 lp.extraPixels = 0;
229 lp.cellsUsed = 0;
230 lp.expandable = false;
231 lp.leftMargin = 0;
232 lp
[all...]
/frameworks/base/core/java/android/widget/
H A DActionMenuView.java165 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
166 lp.leftMargin = lp.rightMargin = 0;
222 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
223 lp.expanded = false;
224 lp.extraPixels = 0;
225 lp.cellsUsed = 0;
226 lp.expandable = false;
227 lp.leftMargin = 0;
228 lp
[all...]
H A DFrameLayout.java186 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
188 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin);
190 child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin);
193 if (lp.width == LayoutParams.MATCH_PARENT ||
194 lp.height == LayoutParams.MATCH_PARENT) {
224 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();
227 if (lp.width == LayoutParams.MATCH_PARENT) {
230 - lp
384 generateLayoutParams(ViewGroup.LayoutParams lp) argument
[all...]
H A DLinearLayout.java428 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
429 final int top = child.getTop() - lp.topMargin - mDividerHeight;
441 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
442 bottom = child.getBottom() + lp.bottomMargin;
469 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
472 position = child.getRight() + lp.rightMargin;
474 position = child.getLeft() - lp.leftMargin - mDividerWidth;
491 final LayoutParams lp = (LayoutParams) child.getLayoutParams();
493 position = child.getLeft() - lp.leftMargin - mDividerWidth;
495 position = child.getRight() + lp
1917 generateLayoutParams(ViewGroup.LayoutParams lp) argument
[all...]
/frameworks/base/tests/net/java/android/net/
H A DLinkPropertiesTest.java258 private void assertAllRoutesHaveInterface(String iface, LinkProperties lp) { argument
259 for (RouteInfo r : lp.getRoutes()) {
271 LinkProperties lp = new LinkProperties();
273 assertTrue(lp.addRoute(r));
274 assertEquals(1, lp.getRoutes().size());
275 assertAllRoutesHaveInterface(null, lp);
278 assertFalse(lp.addRoute(r));
279 assertEquals(1, lp.getRoutes().size());
284 lp.addRoute(r);
289 lp
375 getFirstLinkAddress(LinkProperties lp) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/widget/listview/
H A DListViewHeight.java62 ViewGroup.MarginLayoutParams lp;
63 lp = (ViewGroup.MarginLayoutParams) mInnerList.getLayoutParams();
64 lp.height = 200;
65 mInnerList.setLayoutParams(lp);
78 ViewGroup.MarginLayoutParams lp;
79 lp = (ViewGroup.MarginLayoutParams) mInnerList.getLayoutParams();
80 lp.height = lp.MATCH_PARENT;
81 mInnerList.setLayoutParams(lp);
/frameworks/base/services/core/java/com/android/server/connectivity/tethering/
H A DTetheringInterfaceUtils.java43 final LinkProperties lp = ns.linkProperties;
44 final String if4 = getInterfaceForDestination(lp, Inet4Address.ANY);
84 private static String getInterfaceForDestination(LinkProperties lp, InetAddress dst) { argument
85 final RouteInfo ri = (lp != null)
86 ? RouteInfo.selectBestRoute(lp.getAllRoutes(), dst)
H A DIPv6TetheringCoordinator.java160 final LinkProperties lp = getInterfaceIPv6LinkProperties(sm);
161 sm.sendMessage(TetherInterfaceStateMachine.CMD_IPV6_TETHER_UPDATE, 0, 0, lp);
192 final LinkProperties lp = getIPv6OnlyLinkProperties(
194 if (lp.hasIPv6DefaultRoute() && lp.hasGlobalIPv6Address()) {
195 return lp;
209 private static LinkProperties getIPv6OnlyLinkProperties(LinkProperties lp) { argument
211 if (lp == null) {
218 v6only.setInterfaceName(lp.getInterfaceName());
220 v6only.setMtu(lp
[all...]
/frameworks/support/frameworks/support/samples/SupportTransitionDemos/src/main/java/com/example/android/support/transition/widget/
H A DArcMotionUsage.java59 FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mTarget.getLayoutParams();
60 if ((lp.gravity & Gravity.START) == Gravity.START) {
61 lp.gravity = Gravity.END | Gravity.BOTTOM;
63 lp.gravity = Gravity.START | Gravity.TOP;
65 mTarget.setLayoutParams(lp);
/frameworks/support/samples/SupportTransitionDemos/src/main/java/com/example/android/support/transition/widget/
H A DArcMotionUsage.java59 FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mTarget.getLayoutParams();
60 if ((lp.gravity & Gravity.START) == Gravity.START) {
61 lp.gravity = Gravity.END | Gravity.BOTTOM;
63 lp.gravity = Gravity.START | Gravity.TOP;
65 mTarget.setLayoutParams(lp);
/frameworks/base/tests/GridLayoutTest/src/com/android/test/layout/
H A DLinearLayoutTest.java36 LayoutParams lp = new LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
37 lp.gravity = va | ha;
39 container.addView(v, lp);

Completed in 163 milliseconds

1234567891011>>