I am working on an app, which can run on Froyo
as well as JellyBean
. I have a class that extends PageTransformer as below:
import a
so, some resolutions here:
setAlphaAnimation … API LEVEL 1
AlphaAnimation alpha = new AlphaAnimation(0.7F, 0.7F);
alpha.setDuration(0); // Make animation instant
alpha.setFillAfter(true); // Tell it to persist after the animation ends
view.startAnimation(alpha);
setAlpha INT -> From API LEVEL 1 -> deprecated in 16
Drawable background = localLinLayout.getBackground();
background.setAlpha(180); //255 is max (visible)
setAlpha
FLOAT -> API Level 11+ ->
setImageAlpha
-> API LEVEL 16+ (use just for ImageViews)