Code example for BitmapDrawable

0
		return null; 
	} 
 
	private BitmapDrawable createDrawable(Bitmap bitmap) {
		try { 
			return new BitmapDrawable(bitmap);
		} catch (Throwable t) {
			try { 
				Log.e(TAG, t.getClass().getName() + ": " + t.getMessage(), t);
				return null; 
			} catch(Exception e) {
				// ignore - logging failed 
				return null; 
			} 
		}  
	} 
	 
	public BitmapDrawable createHasChildDrawable() {
		return createDrawable(childIndicatorBitmap);
	}