Code example for ProgressBar

Methods: getVisibilitystartAnimationsetVisibility

0
		//set-up ontouch listener solely for producing haptic feedback 
		quickActionIcon.setOnTouchListener( new HapticTouchListener(HapticFeedbackConstants.KEYBOARD_TAP) );   
	} 
	 
	public static void showQuickActionIcon(final ImageView quickActionIcon, final ProgressBar quickActionProgress, final boolean animate) {
		if(animate==false && quickActionIcon.getVisibility()==View.VISIBLE && quickActionProgress.getVisibility()==View.INVISIBLE) {
			return; 
		} 
		 
		if(animate) {
			quickActionIcon.startAnimation(fadein_decelerate);
		} 
		quickActionIcon.setVisibility(View.VISIBLE);
		quickActionIcon.setClickable(true);
		 
		if(animate) {
			quickActionProgress.startAnimation(fadeout_decelerate);
		} 
		quickActionProgress.setVisibility(View.INVISIBLE);
	} 
	 
	public static void showQuickActionProgress(final ImageView quickActionIcon, final ProgressBar quickActionProgress, final boolean animate) {
		if(animate==false && quickActionIcon.getVisibility()==View.INVISIBLE && quickActionProgress.getVisibility()==View.VISIBLE) {
			return; 
Stop searching for code, let great code find you!  Add Codota to your java IDE