GridView setAdapter - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for GridView setAdapter method.

This code example shows how to use the following methods: setVisibility, setAdapter
 
    @Override 
    public void onNewPhotos(List<FeedItem> photos) {
        mAdapter = new PhotosListAdapter(getSherlockActivity());
        mAdapter.fillWithItems(photos);
        mGridView.setAdapter(mAdapter);
        mAdapter.notifyDataSetChanged();
 
        mProgress.setVisibility(GONE);
        mGridView.setVisibility(VISIBLE);
    } 
 
    public GridView getGridView() {
        return mGridView;
    } 
 
    @Override 
    public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
        getPhotoActivity().showDetailWithSelection(i);
    } 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setOnScrollListener, setAdapter, setOnItemClickListener
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setVisibility, setAdapter
    @Override 
    public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
        if (loader.getId() == LOADER_SNAPSHOTS) {
            if (mAdapter == null) {
                mAdapter = new SnapshotAdapter(getActivity(), data);
                mGrid.setAdapter(mAdapter);
            } else { 
                mAdapter.changeCursor(data);
            } 
            if (mAnimateId > 0) {
                mAdapter.animateIn(mAnimateId);
                mAnimateId = 0;
                getArguments().remove(EXTRA_ANIMATE_ID);
            } 
            boolean empty = mAdapter.isEmpty();
            mGrid.setVisibility(empty ? View.GONE : View.VISIBLE);
            mEmpty.setVisibility(empty ? View.VISIBLE : View.GONE);
        } 
    } 
 
    @Override 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setAdapter
	 
	public void setEmotionGridViewAdapter(EmotionsGridAdapter adapter) {
		if (emotionGrid == null) {
			setEmotionGridView(); 
		} 
		emotionGrid.setAdapter(adapter);
	} 
	 
	public void setEmotionGridViewOnItemClickListener(EditMicroBlogEmotionItemClickListener listener) {
		if (emotionGrid == null) {
			setEmotionGridView(); 
		} 
		emotionGrid.setOnItemClickListener(listener);
	} 
	 
	public int getEmotionViewVisibility() { 
		if (llEmotion == null) {
			setLlEmotion(); 
		} 
		return llEmotion.getVisibility();
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setAdapter, setNumColumns
	public void create() 
	{ 
		setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
		setGravity(Gravity.CENTER);
		 
		grid = new GridView(context);
		adapter = new DesktopSwitcherAdapter(context);
		 
		workspace = myHome.getInstance().getWorkspace();
		desktopCount = workspace.getDesktopCount();
		 
		columnCount = desktopCount;
		if(columnCount > 4)
			columnCount = 4;
		 
		grid.setNumColumns(columnCount);
		grid.setAdapter(adapter);
		 
		addView(grid);
	} 

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related GridView setAdapter Questions & Answers:

Other GridView setAdapter Examples

40:	
41:			// setting grid view adapter
42:			gridView.setAdapter(adapter);
43:		}
44:

Read More

18:			// Instance of ImageAdapter Class
19:			gridView.setAdapter(new ImageAdapter(this));
20:	
21:			/**
22:			 * On Click event for Single Gridview Item

Read More

18:			// Instance of ImageAdapter Class
19:			gridView.setAdapter(new ImageAdapter(this));
20:		}
21:	}
22:

Read More

4:	
5:	    GridView gridview = (GridView) findViewById(R.id.gridview);
6:	    gridview.setAdapter(new ImageAdapter(this));
7:	
8:	    gridview.setOnItemClickListener(new OnItemClickListener() {

Read More

setAdapter Method Overview
Sets the data behind this GridView.
See Code Examples for other Android GridView Methods: