Code example for ImageButton

Methods: setImageURI, setOnClickListener

0
		Item item = equippedItem.getItem();
		if (weapon != null) {
			text1.setText(item.getTitle());
			text2.setText(item.getInfo());
		} 
		iconLeft.setImageURI(item.getIconUri());
		iconLeft.setOnClickListener(this);
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see android.content.DialogInterface.OnClickListener#onClick(android.content .DialogInterface, int) 
	 */ 
	@Override 
	public void onClick(DialogInterface dialog, int which) {
		switch (which) {
		case BUTTON_POSITIVE:
			accept(); 
		case BUTTON_NEGATIVE:
			dismiss();