Code example for ImageView

Methods: setImageDrawable

0
		String rightButton = item.getRightButton();
		TiViewProxy rightView = item.getRightView();
		if((rightButton != null) || (rightView != null)) {
			if (rightButton != null) {
				try { 
					ImageView rightImage = new ImageView(getContext());
					d = tfh.loadDrawable(rightButton, false);
					rightImage.setImageDrawable(d);
					rightPane.addView(rightImage);
 
				} catch (Exception e) {
					Log.e(TAG, "Error loading right button - " + rightButton + ": " + e.getMessage());
 
				} 
 
			} else if (rightView != null) {
				rightPane.addView(rightView.getOrCreateView().getNativeView());
			} 
 
			rightPane.setVisibility(VISIBLE);