Best code examples for GridView getAdapter method (android.widget.GridView.getAdapter)

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

GridView getAdapter examples from Open Source projects
This code example shows how to use the following methods: getAdapter, getNumColumns, getLayoutParams, setLayoutParams
277:	int itemCount = gv.getAdapter().getCount(); 
278:	int columns = gv.getNumColumns(); 
-
283:	ViewGroup.LayoutParams lp = gv.getLayoutParams(); 
-
285:	gv.setLayoutParams(lp); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getAdapter, getNumColumns, getLayoutParams, setLayoutParams
281:	int itemCount = gv.getAdapter().getCount(); 
282:	int columns = gv.getNumColumns(); 
-
287:	ViewGroup.LayoutParams lp = gv.getLayoutParams(); 
-
289:	gv.setLayoutParams(lp); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getChildAt, getChildCount, getAdapter, getListPaddingTop
75:	View firstChild = mGridView.getChildAt(0); 
76:	if (firstChild.getTop() < this.mGridView.getListPaddingTop()) { 
77:	firstChild = mGridView.getChildAt(1); 
-
80:	View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); 
-
87:	View newLastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); 
-
90:	assertEquals("Wrong view in last position", mGridView.getAdapter().getCount() - 1, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAdapter, getLayoutParams, setLayoutParams
279:	int itemCount = gv.getAdapter().getCount(); 
-
284:	ViewGroup.LayoutParams lp = gv.getLayoutParams(); 
-
286:	gv.setLayoutParams(lp); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getChildAt, getChildCount, getAdapter, getHeight, getListPaddingBottom
88:	TouchUtils.dragViewToTop(this, mGridView.getChildAt(mGridView.getChildCount() - 1), 2); 
-
92:	mGridView.getSelectedItemPosition()); 
-
94:	View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); 
-
97:	mGridView.getAdapter().getCount() - 1, lastChild.getId()); 
-
100:	mGridView.getHeight() - mGridView.getListPaddingBottom(), lastChild.getBottom()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getChildAt, getChildCount, getAdapter, getHeight, getListPaddingBottom
72:	TouchUtils.scrollToBottom(this, mGridView); 
-
76:	mGridView.getSelectedItemPosition()); 
-
78:	View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); 
-
80:	assertEquals("Grid is not scrolled to the bottom", mGridView.getAdapter().getCount() - 1, 
-
84:	mGridView.getHeight() - mGridView.getListPaddingBottom(), lastChild.getBottom()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAdapter, getNumColumns, getLayoutParams, setLayoutParams
281:	int itemCount = gv.getAdapter().getCount(); 
282:	int columns = gv.getNumColumns(); 
-
287:	ViewGroup.LayoutParams lp = gv.getLayoutParams(); 
-
289:	gv.setLayoutParams(lp); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAdapter, setAdapter, setOnItemClickListener, setOnScrollListener
106:	if (null == gridView.getAdapter()) { 
107:	gridView.setAdapter(ima); 
-
109:	gridView.setOnScrollListener(new GridScrollListener(ima, icatalog)); 
110:	gridView.setOnItemClickListener(new OnGalleryItemClick(icatalog)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAdapter, setAdapter, setNumColumns
116:	grid.setNumColumns(activeQuestion.getColumns()); 
117:	grid.setAdapter(new AnswersAdapter(activeQuestion, this)); 
-
126:	((AnswersAdapter) grid.getAdapter()).setResult(result); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAdapter, getSelectedItemPosition
58:	((DeleteAdapter)g.getAdapter()).deletePosition(g.getSelectedItemPosition()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAdapter, getSelectedItemPosition
47:	assertEquals(mGridView.getAdapter().getCount() - 1, mGridView.getSelectedItemPosition()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAdapter, getSelectedItemPosition
47:	assertEquals(mGridView.getAdapter().getCount() - 1, mGridView.getSelectedItemPosition()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAdapter, setAdapter
51:	booksGrid.setAdapter(adapter); 
-
53:	((BookItemAdapter) booksGrid.getAdapter()).refreshItems(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getAdapter, setAdapter
59:	if(null == mImageGrid.getAdapter()) 
60:	mImageGrid.setAdapter(new ImagesAdapter(this, cursor)); 
-
62:	((ImagesAdapter) mImageGrid.getAdapter()).changeCursor(cursor); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getAdapter, postInvalidate
102:	BaseAdapter ba = (BaseAdapter) grid.getAdapter(); 
-
104:	grid.postInvalidate(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getAdapter
157:	((WindowAdapter) mGridView.getAdapter()).notifyDataSetChanged(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getAdapter
100:	String url = ((ImageAdapter) this.gridview.getAdapter()).getPreviewUrl(position); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getAdapter
269:	return mGrid.getAdapter(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getAdapter
211:	onItemSelected((T)parent.getAdapter().getItem(position)); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getAdapter
152:	Tile topic = (Tile) ((TileAdapter) mGridView.getAdapter()).getItem(index); 
Full Snippet Info
4
CodeRank
Related GridView getAdapter Questions & Answers:
A view that shows items in two-dimensional scrolling grid. The items in the grid come from the ListAd...
getAdapter Method Overview
Returns the adapter currently associated with this widget.
See Also
  • setHorizontalSpacing
    Set the amount of horizontal (x) spacing to place between each item in the grid.
  • setVerticalSpacing
    Set the amount of vertical (y) spacing to place between each item in the grid.