Code example for Gallery

Methods: setAdapter

0
 
	public void updateItemView(Item item) {
		title.setText(item.getTitle());
		bodyText.setText(item.getBody());
		iA = new ImageAdapter(this, item.getPhotos());
		gallery.setAdapter(iA);
	} 
 
	public void onBackPressed() { 
		super.onBackPressed(); 
	} 
 
} 
 
class ImageAdapter extends BaseAdapter {
	private Context mContext;
	private int position;
	private PhotoKeyValue[] photos;
 
	public ImageAdapter(Context c, PhotoKeyValue[] pkv) {
Connect your IDE to all the code out there  Get Codota for Java