79771473

Date: 2025-09-22 10:01:35
Score: 0.5
Natty:
Report link

Right now your animation looks shaky because you’re resizing the whole window with window.setAttributes() on every frame that forces android to relayout the entire activity and it stutters. The smoother way is to put your dialog content inside a container view (like a FrameLayout), start it at half screen height and then animate that view’s height using a ValueAnimator. That way only the container is remeasured not the whole window, and the animation runs much more smoothly. Also use an interpolator like DecelerateInterpolator instead of LinearInterpolator to make the motion feel natural.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Abdul_Basit