java - RelativeLayout执行属性动画时弹出软键盘遮挡住布局里部分控件导致不可见
巴扎黑
巴扎黑 2017-04-18 10:02:22
0
1
592

问题描述:EditText为了不让软键盘挡住,监听了键盘弹起状态,键盘弹起时马上执行包裹EditText的RelativeLayout上升的动画,由于软键盘弹起速度很快,在动画开始前RelativeLayout的部分控件就被键盘遮挡住了,导致动画结束这些控件一直不可见。

属性动画:

ObjectAnimator animator = ObjectAnimator.ofFloat(container, "translationY", -mIvLoginBg.getMeasuredHeight()) .setDuration(200); animator.start();
巴扎黑
巴扎黑

reply all (1)
大家讲道理

The keyboard pop-up layout can be moved up without animation.
Add settings in the activity corresponding to the layout

android:windowSoftInputMode="stateHidden|adjustPan
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!