Code example for ShapeDrawable

Methods: setAlpha

        a.addUpdateListener(new AnimatorUpdateListener() {
        	/* Listen to the update event */ 
            public void onAnimationUpdate(ValueAnimator va) {
                int value = (Integer) va.getAnimatedValue(); // Use animated value anyhow you want!
				myShapeDrawable.setAlpha(value); // For example, change transparency of our drawable!
                myView.invalidate(); // Redraw!
    /* Our custom view which will draw the drawable */ 
    private class MyView extends View {
        public MyView(Context context) {
Connect your IDE to all the code out there  Get Codota for Java