Code example for BitmapDrawable

Methods: setAntiAlias

0
			i.setLayoutParams(new CoverFlow.LayoutParams(260, 260));
			i.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
 
			//Make sure we set anti-aliasing otherwise we get jaggies 
			BitmapDrawable drawable = (BitmapDrawable) i.getDrawable();
			drawable.setAntiAlias(true);
			return i;
 
			//return mImages[position]; 
		} 
 
		/** Returns the size (0.0f to 1.0f) of the views  
		   * depending on the 'offset' to the center. */ 
		public float getScale(boolean focused, int offset) {
			/* Formula: 1 / (2 ^ offset) */ 
			return Math.max(0, 1.0f / (float) Math.pow(2, Math.abs(offset)));
		} 
 
	} 
}