Code example for Gallery

Methods: setOnItemClickListener

0
					textView.setText("default text");
				} 
			} 
		}); 
		 
		gallery.setOnItemClickListener(new OnItemClickListener() {
 
			@Override 
			public void onItemClick(AdapterView<?> parent, View view,
					int position, long id) {
				 
			} 
		}); 
	} 
 
	private void startActivity(Class<?> cls) {
		Intent intent = new Intent();
		intent.setClass(MainActivity.this, cls);
		startActivity(intent);
	}