Code example for Gallery

Methods: setOnItemClickListener, setOnItemLongClickListener

0
                setResult(RESULT_OK);
                finish();
            } 
        }); 
         
	    mGallery.setOnItemClickListener(new OnItemClickListener() {
	        public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
	            launchImageViewer(position);
	        } 
	    }); 
	     
	    mGallery.setOnItemLongClickListener(new OnItemLongClickListener() {
			public boolean onItemLongClick(AdapterView<?> parent, View v, int position, long id) {
				//Toast.makeText(mContext, "item position"+position, Toast.LENGTH_SHORT).show(); 
				mGalleryItemToRemove=position;
				showDialog(GALLERY_DIALOG);
				return false; 
			} 
	    }); 
	     
	    mBodyText.setOnFocusChangeListener(new OnFocusChangeListener() {