问题描述:EditText为了不让软键盘挡住,监听了键盘弹起状态,键盘弹起时马上执行包裹EditText的RelativeLayout上升的动画,由于软键盘弹起速度很快,在动画开始前RelativeLayout的部分控件就被键盘遮挡住了,导致动画结束这些控件一直不可见。
属性动画:
ObjectAnimator animator = ObjectAnimator.ofFloat(container, "translationY", -mIvLoginBg.getMeasuredHeight()) .setDuration(200); animator.start();
The keyboard pop-up layout can be moved up without animation.
Add settings in the activity corresponding to the layout