###Android two image gradient implementation
PNG to bG2.png after 4000ms. Mainly used in the android. Graphics. The drawable. TransitionDrawable. TransitionDrawable class
Resource res = getResource(); ImageTransitionDrawable = null; imageTransitionDrawable = new TransitionDrawable( new Drawable[]{ res.getDrawable(R.drawable.bg1), res.getDrawable(R.drawable.bg2) } ); / / set the background image for the gradient image enclosing setBackgroundDrawable (imageTransitionDrawable); / / after a 4000 ms picture imageTransitionDrawable gradient process. The startTransition (4000);Copy the code