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

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

Android ScrollView examples from Open Source projects
This code example shows how to use the following methods: addView, setOrientation, addView
47:	LinearLayout layout = new LinearLayout(this); 
48:	layout.setOrientation(LinearLayout.VERTICAL); 
-
54:	layout.addView(editText); 
-
56:	((ScrollView) mRootView).addView(layout); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: addView, setOrientation, addView
48:	LinearLayout layout = new LinearLayout(this); 
49:	layout.setOrientation(LinearLayout.VERTICAL); 
-
58:	layout.addView(button); 
59:	layout.addView(editText); 
-
61:	((ScrollView) mRootView).addView(layout); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: setBackgroundColor, setLayoutParams, setScrollContainer, addView, setFillViewport
100:	scrollView.setFillViewport(true); 
101:	scrollView.setBackgroundColor(Color.parseColor("#00000000")); 
102:	scrollView.setScrollContainer(false); 
103:	scrollView.setLayoutParams(scrollViewParams); 
104:	scrollView.addView(original); 
-
146:	return new ScrollView(parent); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLayoutParams, setVerticalScrollBarEnabled, addView
61:	ScrollView tscroll = new ScrollView(context); 
62:	tscroll.setVerticalScrollBarEnabled(true); 
63:	tscroll.setLayoutParams(new LinearLayout.LayoutParams( 
-
76:	tscroll.addView(textView); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLayoutParams, addView, setFillViewport
59:	ScrollView scrollView = new ScrollView(getContext()); 
60:	scrollView.setFillViewport(true); 
61:	scrollView.setLayoutParams(scrollViewLayout); 
62:	scrollView.addView(actionLayoutView, childViewLayout); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: assertHasScreenCoordinates, assertOffScreenBelow, assertOnScreen, getHeight, getVerticalFadingEdgeLength
100:	ViewAsserts.assertOffScreenBelow(mScrollView, mChildToScrollTo); 
-
108:	ViewAsserts.assertOnScreen(mScrollView, mChildToScrollTo); 
109:	ViewAsserts.assertHasScreenCoordinates( 
-
112:	mScrollView.getHeight() 
-
114:	- mScrollView.getVerticalFadingEdgeLength()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView
146:	ScrollView scroller = new ScrollView(this); 
147:	scroller.addView(view, new ScrollView.LayoutParams(ScrollView.LayoutParams.MATCH_PARENT, 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setPadding, addView, setView
34:	.setView(LinkifyText(context, text)) 
-
40:	ScrollView svMessage = new ScrollView(context); 
-
49:	svMessage.setPadding(14, 2, 10, 12); 
50:	svMessage.addView(tvMessage); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addView
45:	ScrollView sv = new ScrollView(this); 
-
52:	sv.addView(ll); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId, setLayoutParams, setScrollBarStyle, addView
113:	ScrollView sv = new ScrollView(getContext()); 
114:	sv.setId(generateViewId()); 
-
119:	sv.setLayoutParams(lp); 
120:	sv.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_INSET); 
-
130:	sv.addView(ll); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: fullScroll
51:	scroll.fullScroll(View.FOCUS_DOWN); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId, setLayoutParams, setPadding, addView
142:	feedbackScrollView = new ScrollView(context); 
143:	feedbackScrollView.setId(FEEDBACK_SCROLLVIEW_ID); 
-
149:	feedbackScrollView.setLayoutParams(params); 
150:	feedbackScrollView.setPadding(padding, padding, padding, padding); 
-
168:	feedbackScrollView.addView(wrapperLayoutFeedback); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLayoutParams, addView
52:	ScrollView sv = new ScrollView(context); 
53:	sv.addView(linLayout); 
54:	sv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 
-
57:	getTheme().applyOuter1(sv); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: assertHasScreenCoordinates, assertOffScreenBelow, assertOnScreen, getHeight, getVerticalFadingEdgeLength
66:	ViewAsserts.assertOffScreenBelow(mScrollView, mTextBlob); 
-
74:	ViewAsserts.assertOnScreen(mScrollView, mTextBlob); 
75:	ViewAsserts.assertHasScreenCoordinates( 
-
78:	mScrollView.getHeight() 
-
80:	- mScrollView.getVerticalFadingEdgeLength()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
54:	ScrollView sv = new ScrollView(this); 
55:	sv.addView(tv); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
116:	ScrollView scroller = new ScrollView(this); 
117:	scroller.addView(view, new ScrollView.LayoutParams(ScrollView.LayoutParams.MATCH_PARENT, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getVisibility
92:	if (mNotificationPanel.isFullyExpanded() && mScrollView.getVisibility() == View.VISIBLE) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getHeight, getScrollY, isFocused, offsetDescendantRectToMyCoords, getMaxScrollAmount
56:	mScrollView.offsetDescendantRectToMyCoords(descendant, mTempRect); 
-
122:	- mScrollView.getHeight(); 
-
125:	mScrollView.getScrollY()); 
-
131:	maxScroll - mScrollView.getMaxScrollAmount(), 
132:	mScrollView.getScrollY()); 
-
135:	getTopWithinScrollView(mBottomButton) > mScrollView.getScrollY() + mScrollView.getHeight()); 
-
140:	assertTrue("scroll view should be focused", mScrollView.isFocused()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
146:	ScrollView scroller = new ScrollView(this); 
147:	scroller.addView(view, new ScrollView.LayoutParams(ScrollView.LayoutParams.MATCH_PARENT, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: assertHasScreenCoordinates, assertOffScreenBelow, assertOnScreen, getHeight, getVerticalFadingEdgeLength
100:	ViewAsserts.assertOffScreenBelow(mScrollView, mChildToScrollTo); 
-
108:	ViewAsserts.assertOnScreen(mScrollView, mChildToScrollTo); 
109:	ViewAsserts.assertHasScreenCoordinates( 
-
112:	mScrollView.getHeight() 
-
114:	- mScrollView.getVerticalFadingEdgeLength()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getHeight, getLocationOnScreen
50:	mScrollView.getLocationOnScreen(origin); 
-
52:	mScreenBottom = origin[1] + mScrollView.getHeight(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
52:	ScrollView scroller = new ScrollView(getActivity()); 
-
57:	scroller.addView(text); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLayoutParams, addView
205:	ScrollView sv = new ScrollView(context); 
206:	sv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 1)); 
-
279:	sv.addView(llContent); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: removeAllViews, addView, fullScroll
78:	scrollView.removeAllViews(); 
79:	scrollView.addView(layout); 
80:	scrollView.fullScroll(ScrollView.FOCUS_UP); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: assertHasScreenCoordinates, assertOffScreenBelow, assertOnScreen, getHeight, getVerticalFadingEdgeLength
100:	ViewAsserts.assertOffScreenBelow(mScrollView, mChildToScrollTo); 
-
108:	ViewAsserts.assertOnScreen(mScrollView, mChildToScrollTo); 
109:	ViewAsserts.assertHasScreenCoordinates( 
-
112:	mScrollView.getHeight() 
-
114:	- mScrollView.getVerticalFadingEdgeLength()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getScrollX, getScrollY
49:	this.scrollX = scrollView.getScrollX(); 
50:	this.scrollY = scrollView.getScrollY(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLayoutParams, setVerticalScrollBarEnabled, addView
117:	ScrollView tscroll = new ScrollView(parentApp); 
118:	tscroll.setVerticalScrollBarEnabled(true); 
119:	tscroll.setLayoutParams(new LinearLayout.LayoutParams(WCON, WCON, 1)); 
-
130:	tscroll.addView(textView); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: assertHasScreenCoordinates, assertOffScreenBelow, assertOnScreen, getHeight, getVerticalFadingEdgeLength
66:	ViewAsserts.assertOffScreenBelow(mScrollView, mTextBlob); 
-
74:	ViewAsserts.assertOnScreen(mScrollView, mTextBlob); 
75:	ViewAsserts.assertHasScreenCoordinates( 
-
78:	mScrollView.getHeight() 
-
80:	- mScrollView.getVerticalFadingEdgeLength()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getHeight, getScrollY, offsetDescendantRectToMyCoords
104:	mScrollView.offsetDescendantRectToMyCoords(b, mTempRect); 
105:	return mTempRect.bottom >= mScrollView.getScrollY() 
106:	&& mTempRect.top <= (mScrollView.getScrollY() + mScrollView.getHeight()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setPadding, setVerticalScrollBarEnabled, addView
33:	ScrollView scrollView = new ScrollView(context); 
34:	scrollView.addView(kashiView); 
35:	scrollView.setPadding(30, 40, 30, 40); 
-
39:	scrollView.setVerticalScrollBarEnabled(false); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setBackgroundColor, addContentView, addView
17:	ScrollView scrollView = new ScrollView(this); 
-
24:	scrollView.setBackgroundColor(Color.parseColor("#228b22")); 
25:	scrollView.addView(content); 
26:	getWindow().addContentView(scrollView, getWindow().getAttributes()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: fullScroll
186:	sv.fullScroll(ScrollView.FOCUS_DOWN); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLayoutParams, addView
61:	ScrollView scrollView = new ScrollView(mContext); 
62:	scrollView.setLayoutParams(new Gallery.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); 
-
67:	scrollView.addView(songView); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
58:	scroll = new ScrollView(this.getContext()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLayoutParams, addView
134:	ScrollView scroll = new ScrollView(MemberBonusActivity.this); 
135:	scroll.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); 
136:	scroll.addView(iv); 
-
138:	setContentView(scroll); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView, setFillViewport
16:	ScrollView scroll = new ScrollView(this); 
17:	scroll.setFillViewport(true); 
-
22:	scroll.addView(zv); 
-
24:	setContentView(scroll); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
66:	ScrollView mScrollView = new ScrollView(mContext); 
67:	mScrollView.addView(mAboutText); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setOrientation, addView
37:	LinearLayout l = new LinearLayout(m); 
38:	l.setOrientation(LinearLayout.VERTICAL); 
39:	super.addView(l, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setPadding, addView, setView
34:	.setView(LinkifyText(context, text)) 
-
40:	ScrollView svMessage = new ScrollView(context); 
-
50:	svMessage.setPadding(14, 2, 10, 12); 
51:	svMessage.addView(tvMessage); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
96:	ScrollView scr = new ScrollView(context); 
97:	scr.addView(view_cach[position]); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setPadding, addView, setView
40:	.setView(view) 
-
46:	ScrollView svMessage = new ScrollView(context); 
-
55:	svMessage.setPadding(14, 2, 10, 12); 
56:	svMessage.addView(tvMessage); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addView
34:	ScrollView scroller = new ScrollView(this); 
35:	scroller.addView(new CustomTextView(this)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setBackgroundColor, setLayoutParams, addView
37:	ScrollView scrollview = new ScrollView(this); 
38:	scrollview.setBackgroundColor(Color.RED); 
39:	scrollview.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT)); 
-
46:	scrollview.addView(rootLayout); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: addView
91:	final ScrollView scrollView = new ScrollView(context); 
-
102:	scrollView.addView(webView); 
Full Snippet Info
6
CodeRank
Related Android ScrollView Questions & Answers:
See Code Examples for Android ScrollView Methods: