Best code examples for Android FrameLayout class (android.widget.FrameLayout)

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

Android FrameLayout examples from Open Source projects
This code example shows how to use the following methods: setBackgroundColor, setLayoutParams, setVisibility, addView, addContentView
134:	mCustomViewContainer = new FrameLayout(activity); 
135:	mCustomViewContainer.setBackgroundColor(Color.BLACK); 
136:	mCustomViewContainer.setLayoutParams(params); 
137:	activity.getWindow().addContentView(mCustomViewContainer, params); 
-
139:	mCustomViewContainer.addView(view); 
-
142:	mCustomViewContainer.setVisibility(View.VISIBLE); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: measure, setBackground, layout, draw, dispatchOnPreDraw
76:	FrameLayout content = new FrameLayout(context); 
-
80:	content.setBackground(d); 
-
83:	AttachInfo_Accessor.setAttachInfo(content); 
-
91:	content.measure(w_spec, h_spec); 
-
94:	content.layout(0, 0, w, h); 
-
97:	AttachInfo_Accessor.dispatchOnPreDraw(content); 
-
111:	content.draw(canvas); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: setLayoutParams, setOnTouchListener, addView
75:	final FrameLayout layout = new FrameLayout(context); 
-
77:	layout.setLayoutParams(layoutParams); 
78:	layout.addView(textView); 
79:	layout.setOnTouchListener(this); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setBackgroundColor, addView
35:	FrameLayout layout = new FrameLayout(this); 
-
39:	layout.addView(b); 
40:	layout.setBackgroundColor(0xffffffff); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: measure, setBackgroundDrawable, layout, draw, dispatchOnPreDraw
74:	FrameLayout content = new FrameLayout(context); 
-
78:	content.setBackgroundDrawable(d); 
-
81:	AttachInfo_Accessor.setAttachInfo(content); 
-
89:	content.measure(w_spec, h_spec); 
-
92:	content.layout(0, 0, w, h); 
-
95:	AttachInfo_Accessor.dispatchOnPreDraw(content); 
-
109:	content.draw(canvas); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setLayoutParams, addView
74:	FrameLayout root = new FrameLayout(getActivity()); 
-
79:	root.addView(tv, new FrameLayout.LayoutParams( 
-
85:	root.addView(lv, new FrameLayout.LayoutParams( 
-
90:	root.setLayoutParams(lp); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: addView
37:	final FrameLayout layout = new FrameLayout(this); 
38:	layout.addView(view, new FrameLayout.LayoutParams(800, 400, Gravity.CENTER)); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: addView
33:	FrameLayout layout = new FrameLayout(this); 
-
44:	layout.addView(b); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: addView
44:	FrameLayout content = new FrameLayout(this); 
-
73:	content.addView(mTextureView, new FrameLayout.LayoutParams(500, 400, Gravity.CENTER)); 
74:	content.addView(button, new FrameLayout.LayoutParams( 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView
50:	FrameLayout frame = new FrameLayout(this); 
-
52:	frame.addView(gpuView); 
-
55:	frame.addView(swView); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView
121:	mRefreshableViewHolder = new FrameLayout(context); 
122:	mRefreshableViewHolder.addView(refreshableView, 
-
125:	addView(mRefreshableViewHolder, new LinearLayout.LayoutParams( 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId, setLayoutParams
46:	FrameLayout fl = new FrameLayout(activity); 
47:	fl.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 
-
49:	fl.setId(CONTENT_VIEW_ID); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLayoutParams, addView
54:	FrameLayout framelayout = new FrameLayout(this); 
55:	framelayout.setLayoutParams(framelayout_params); 
-
65:	framelayout.addView(edittext); 
-
71:	framelayout.addView(mGLView); 
-
78:	setContentView(framelayout); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView
144:	FrameLayout container = new FrameLayout(context); 
-
152:	((ViewGroup) target).addView(container, 
-
156:	container.addView(this); 
-
167:	container.addView(target); 
-
170:	container.addView(this); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId, setLayoutParams
98:	FrameLayout tabContent = new FrameLayout( activity ); 
99:	tabContent.setId( android.R.id.tabcontent ); 
-
102:	tabContent.setLayoutParams( tabContentParams ); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, measure
87:	f.getPaddingLeft() + f.getPaddingRight(), 
-
89:	int verticalPadding = f.getPaddingBottom() + f.getPaddingTop(); 
-
110:	mFrame.measure( 
-
113:	mFrame.layout(l + hSpace, t + vSpace, r - hSpace, b - vSpace); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView
41:	final FrameLayout layout = new FrameLayout(this); 
42:	layout.addView(view, new FrameLayout.LayoutParams(480, 800, Gravity.CENTER)); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: addView
120:	mRefreshableViewHolder = new FrameLayout(context); 
121:	mRefreshableViewHolder.addView(refreshableView, 
-
124:	addView(mRefreshableViewHolder, new LinearLayout.LayoutParams( 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId, setLayoutParams
46:	FrameLayout fl = new FrameLayout(activity); 
47:	fl.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 
-
49:	fl.setId(CONTENT_VIEW_ID); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setBackgroundColor, addView
31:	FrameLayout layout = new FrameLayout(this); 
-
36:	layout.addView(b); 
37:	layout.setBackgroundColor(0xffffffff); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView
144:	FrameLayout container = new FrameLayout(context); 
-
152:	((ViewGroup) target).addView(container, 
-
156:	container.addView(this); 
-
167:	container.addView(target); 
-
170:	container.addView(this); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLayoutParams, addView
59:	FrameLayout framelayout = new FrameLayout(this); 
60:	framelayout.setLayoutParams(framelayout_params); 
-
70:	framelayout.addView(edittext); 
-
76:	framelayout.addView(mGLView); 
-
83:	setContentView(framelayout); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEnabled, setVisibility, addView, getChildCount, removeAllViews
48:	mCustomView.setEnabled(enabled); 
-
64:	final boolean hasCustomView = mCustomView.getChildCount() > 0; 
-
68:	mCustomView.setVisibility(View.VISIBLE); 
-
72:	mCustomView.setVisibility(View.GONE); 
-
120:	mCustomView.removeAllViews(); 
-
122:	mCustomView.addView(actionView); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: forceLayout, setVisibility, addView
200:	FrameLayout content = new FrameLayout(this.getContext()); 
-
217:	content.addView(webViewContainer); 
218:	content.setVisibility(View.VISIBLE); 
-
220:	content.forceLayout(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setBackgroundColor, addView
35:	FrameLayout layout = new FrameLayout(this); 
-
39:	layout.addView(b); 
40:	layout.setBackgroundColor(0xffffffff); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId
18:	FrameLayout frame = new FrameLayout(this); 
19:	frame.setId(CONTENT_VIEW_ID); 
20:	setContentView(frame, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getChildAt
52:	innerContainer = (LinearLayout) containerView.getChildAt(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLayoutParams, addView
33:	FrameLayout wrappedView = new FrameLayout(activity); 
34:	wrappedView.setLayoutParams(wrappedLayoutParams); 
-
38:	wrappedView.addView(adView, new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT)); 
-
40:	adView.loadNewAd(10000L, listener, wrappedView); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, measure
72:	int horizontalPadding = Math.max(f.getPaddingLeft() + f.getPaddingRight(),(int) (MIN_HORIZONTAL_MARGIN * mMetrics.density)); 
73:	int verticalPadding = f.getPaddingBottom() + f.getPaddingTop(); 
-
90:	mFrame.measure(MeasureSpec.makeMeasureSpec(frameWidth, MeasureSpec.EXACTLY),MeasureSpec.makeMeasureSpec(frameHeight, MeasureSpec.EXACTLY)); 
91:	mFrame.layout(l + hSpace, t + vSpace, r - hSpace, b - vSpace); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView
50:	mContent = new FrameLayout(this); 
-
91:	mContent.addView(mTextureView, new FrameLayout.LayoutParams( 
-
94:	mContent.addView(button, new FrameLayout.LayoutParams( 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop
89:	int horizontalPadding = f.getPaddingLeft() + f.getPaddingRight(); 
90:	int verticalPadding = f.getPaddingBottom() + f.getPaddingTop(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
31:	FrameLayout layout = new FrameLayout(this); 
-
33:	layout.addView(text, new FrameLayout.LayoutParams(600, 350, Gravity.CENTER)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId
204:	decorView = new FrameLayout(getContext()); 
-
207:	decorView.setId(R.id.content); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView, removeAllViews
189:	mAppWidgetFrame.removeAllViews(); 
-
191:	mAppWidgetFrame.addView(mAppWidgetView, mPreviewWidth, mPreviewHeight); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getChildAt
51:	innerContainer = (LinearLayout) containerView.getChildAt(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
72:	mContent = new FrameLayout(getContext()); 
-
96:	mContent.addView(webViewContainer); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
37:	final FrameLayout layout = new FrameLayout(this); 
38:	layout.addView(view, new FrameLayout.LayoutParams(800, 400, Gravity.CENTER)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getChildAt
50:	innerContainer = (LinearLayout) containerView.getChildAt(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
37:	final FrameLayout layout = new FrameLayout(this); 
38:	layout.addView(view, new FrameLayout.LayoutParams(480, 800, Gravity.CENTER)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId, setLayoutParams
18:	FrameLayout rootView = new FrameLayout(this); 
19:	rootView.setLayoutParams(new ViewGroup.LayoutParams( 
-
22:	rootView.setId(android.R.id.primary); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView
41:	final FrameLayout layout = new FrameLayout(this); 
42:	layout.addView(view, new FrameLayout.LayoutParams(480, 800, Gravity.CENTER)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getContext, addView
27:	super(detailFrame.getContext(), detailLayoutResId, imageLoader, dbController); 
-
30:	mDetailFrame.addView(mFactory.inflate(detailLayoutResId, null), LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView
39:	FrameLayout content = new FrameLayout(this); 
-
45:	content.addView(mTextureView, new FrameLayout.LayoutParams(500, 500, Gravity.CENTER)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: postDelayed, setVisibility
217:	mKeyguardHost.setVisibility(View.GONE); 
-
223:	mKeyguardHost.postDelayed(new Runnable() { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setBackgroundColor, addView
89:	FrameLayout contentFrameLayout = new FrameLayout(GameActivity.getContext()); 
90:	contentFrameLayout.setBackgroundColor(Color.TRANSPARENT); 
91:	contentFrameLayout.addView(webViewContainer); 
-
93:	contentFrameLayout.addView(closeImageView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setPadding, addView
73:	FrameLayout rootLayout = new FrameLayout(this.mContext); 
74:	rootLayout.setPadding(10, 0, 10, 0); 
75:	rootLayout.addView(this.mEditTextView); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getId, setId
41:	FrameLayout view = new FrameLayout(getActivity().getApplicationContext()); 
42:	view.setId(10101011); // do we need to fake this id? 
-
45:	ft.add(view.getId(), frag); 
Full Snippet Info
6
CodeRank
Related Android FrameLayout Questions & Answers:
See Code Examples for Android FrameLayout Methods: