Best code examples for Android ViewGroup.MarginLayoutParams class (android.view.ViewGroup.MarginLayoutParams)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ViewGroup.MarginLayoutParams class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android ViewGroup.MarginLayoutParams examples from Open Source projects
This code example shows how to use the following methods: setMargins
42:	LayoutParams p = new FrameLayout.LayoutParams((int)width,(int)height,0); 
43:	p.setMargins((int)left, (int)top, (int)right, (int)bottom); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setMarginStart
74:	layoutParams.setMarginStart(start); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
43:	params = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT); 
-
52:	params.setMargins(integerLayoutX, integerLayoutY, 0, 0); 
-
54:	Home.getHome().getLayout().addView(timePicker, params); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
81:	RelativeLayout.LayoutParams lp = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, 
-
84:	lp.setMargins(x, y, 0, 0); 
85:	control.setLayoutParame(lp); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
81:	RelativeLayout.LayoutParams lp = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, 
-
84:	lp.setMargins(x, y, 0, 0); 
85:	control.setLayoutParame(lp); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
43:	params = new FrameLayout.LayoutParams(integerWidth,integerHeight); 
-
49:	params.setMargins(integerLayoutX, integerLayoutY, 0, 0); 
-
51:	Home.getHome().getLayout().addView(button, params); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
16:	params.setMargins(0, 0, 0, 0); //left, top, right, bottom 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
75:	LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, 
-
77:	params.setMargins(0, 20, 0, 0); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods:
132:	MarginLayoutParams layoutParams = new MarginLayoutParams( 0, 0 ); 
133:	when( progressBar.getLayoutParams() ).thenReturn( layoutParams ); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
92:	LinearLayout.LayoutParams params=new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); 
93:	params.setMargins(mMargins, formatDipToPx(mContext, 10), mMargins, 0); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
45:	LayoutParams params = new LayoutParams( 
-
51:	params.setMargins(3, 3, 3, 3); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
52:	MarginLayoutParams blp = new MarginLayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); 
53:	blp.setMargins(15, 0, 15, 0); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
58:	LinearLayout.LayoutParams params = new LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, 10); 
59:	params.setMargins(2, 2, 2, 2); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
214:	LinearLayout.LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); 
215:	layoutParams.setMargins(0, 5, 0, 5); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
32:	lp.setMargins( (int)(mStart + change), 0, -(int)(mStart + change), 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
76:	LayoutParams params=new LayoutParams(context.getResources().getDisplayMetrics().widthPixels, context.getResources().getDisplayMetrics().heightPixels); 
77:	params.setMargins(0, 0, 0, 0); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
69:	LayoutParams lp = new LayoutParams( 
-
72:	lp.setMargins(3, 12, 0, 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
58:	LayoutParams image_params = new LayoutParams(50, 50); 
59:	image_params.setMargins(5, 5, 20, 0); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
43:	MarginLayoutParams params = new MarginLayoutParams(MarginLayoutParams.MATCH_PARENT, MarginLayoutParams.MATCH_PARENT); 
44:	params.setMargins(10, 0, 10, 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
25:	MarginLayoutParams marginParams = new MarginLayoutParams(mView.getLayoutParams()); 
26:	marginParams.setMargins(0, 0, 0, 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
17:	MarginLayoutParams mlp = new MarginLayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT); 
18:	mlp.setMargins(50, 20, 25, 20); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
163:	LayoutParams ll = new LayoutParams(LINE_WIDTH, NAV_HEIGHT); 
164:	ll.setMargins(offset, 0, 0, 0); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setLayoutParams, setMargins
218:	LayoutParams params3 = new LayoutParams(LayoutParams.WRAP_CONTENT, 
-
221:	params3.setMargins(img_location[0], img_location[1], 0, 0); 
222:	img[0].setLayoutParams(params3); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
70:	params = new FrameLayout.LayoutParams(integerWidth,integerHeight); 
-
79:	params.setMargins(integerLayoutX, integerLayoutY, 0, 0); 
-
88:	Home.getHome().getLayout().addView(password, params); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
53:	lp.setMargins(left, top, right, bottom); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
26:	RelativeLayout.LayoutParams a = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); 
27:	a.setMargins(l,t,0,0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
266:	mLayoutParams.setMargins(mLayoutParams.leftMargin, mLayoutParams.topMargin,mLayoutParams.rightMargin, newMarginBottom); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
53:	LinearLayout.LayoutParams localLayoutParams2 = new LinearLayout.LayoutParams(localLayoutParams1.width, localLayoutParams1.height, paramFloat); 
54:	localLayoutParams2.setMargins(localLayoutParams1.leftMargin, localLayoutParams1.topMargin, localLayoutParams1.rightMargin, localLayoutParams1.bottomMargin); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
81:	lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); 
82:	lp.setMargins(20, 20, 20, 10); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
218:	mLayoutParams.setMargins(mLayoutParams.leftMargin, mLayoutParams.topMargin,mLayoutParams.rightMargin, newMarginBottom); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
60:	marginLayoutParams.setMargins(x, y, 0, 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
24:	this.textViewParams = new LayoutParams(100, 100); 
25:	this.textViewParams.setMargins(2, 2, 2, 2); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
17:	LayoutParams layoutParams_layout_info = new LinearLayout.LayoutParams( 
-
19:	layoutParams_layout_info.setMargins(0, Actions.DPFromPixel(5), 0, 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
18:	LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT, 
-
22:	lp.setMargins(p, 2 * p, p, 2 * p); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
22:	MarginLayoutParams mlp = new MarginLayoutParams(MarginLayoutParams.WRAP_CONTENT, MarginLayoutParams.WRAP_CONTENT); 
23:	mlp.setMargins(left, top, right, bottom); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
247:	mLayoutParams.setMargins(mLayoutParams.leftMargin, mLayoutParams.topMargin,mLayoutParams.rightMargin, newMarginBottom); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
81:	lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); 
82:	lp.setMargins(20, 20, 20, 10); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMargins
17:	LayoutParams layoutParams_layout_info = new LinearLayout.LayoutParams( 
-
19:	layoutParams_layout_info.setMargins(0, Actions.DPFromPixel(5), 0, 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
217:	mLayoutParams.setMargins(mLayoutParams.leftMargin, mLayoutParams.topMargin,mLayoutParams.rightMargin, newMarginBottom); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
47:	FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(frames[2], frames[3]); 
48:	params.setMargins(frames[0], frames[1],0,0); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
49:	marginLayoutParams.setMargins(x, y, 0, 0); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
29:	lp.setMargins(0,-(int) (mStart + change),0, (int) (mStart + change)); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
169:	mLayoutParams.setMargins(mLayoutParams.leftMargin, mLayoutParams.topMargin,mLayoutParams.rightMargin, newMarginBottom); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setMargins
38:	mLayoutParams.setMargins(mLayoutParams.leftMargin, 
Full Snippet Info
4
CodeRank
Related Android ViewGroup.MarginLayoutParams Questions & Answers:
See Code Examples for Android ViewGroup.MarginLayoutParams Methods: