Code example for BitmapDrawable

Methods: setAlpha

0
		public void run() { 
			long elapsedTime = System.currentTimeMillis() - mStartTime;
			 
			int alpha = Math.min((int)(255 * (float)(elapsedTime)/FADE_DURATION), 255);
			if (mBitmapDrawable != null) {
				mBitmapDrawable.setAlpha(alpha);
				invalidate();
			} 
		 
			if (mIsRunning && alpha < 255) {
				RemoteThumbImageView.this.post(this);
			} else { 
				mIsRunning = false;
			} 
		}		 
	} 
}