Code example for View

Methods: getHeightgetLayoutParams

0
		// callback. 
		// This triggers layout on each animation frame; in the future we may 
		// want to do something 
		// smarter and more performant. 
 
		final ViewGroup.LayoutParams lp = mView.getLayoutParams();
		final int originalHeight = mView.getHeight();
 
		ValueAnimator animator = ValueAnimator.ofInt(originalHeight, 1)
				.setDuration(mAnimationTime);
 
		animator.addListener(new AnimatorListenerAdapter() {
			@Override 
			public void onAnimationEnd(Animator animation) {
				mCallback.onDismiss(mView, mToken);
				// Reset view presentation 
				mView.setAlpha(1f);
				mView.setTranslationX(0);
				lp.height = originalHeight;
				mView.setLayoutParams(lp);
Contextual code suggestions in your IDE  Get Codota for Java