| | |
| | | initView(); |
| | | //初始化界面监听器 |
| | | initEvent(); |
| | | ///**/在界面中使用: |
| | | //在界面中使用 |
| | | // KeyboardStateObserverUtils.getKeyboardStateObserver(_mActivity).setKeyboardVisibilityListener(new KeyboardStateObserverUtils.OnKeyboardVisibilityListener() { |
| | | // @Override |
| | | // |
| | | // public void onKeyboardShow() { |
| | | // public void onKeyboardShow(int h) { |
| | | // //Toast.makeText(MainActivity.this,"键盘弹出",Toast.LENGTH_SHORT).show(); |
| | | // ConstraintSet cs = new ConstraintSet(); |
| | | // cs.connect(R.id.home_login_title_tv, ConstraintSet.TOP, ConstraintSet.PARENT_ID, ConstraintSet.TOP, 400);// |
| | | // cs.clone(viewBinding.homeLoginParentCl); |
| | | //// (viewBinding.loadingConfirmationRl.getTop()-dip2px(h)) |
| | | // cs.connect(R.id.home_login_tv, ConstraintSet.BOTTOM, ConstraintSet.PARENT_ID, ConstraintSet.BOTTOM, h);// |
| | | // //应用约束 |
| | | // cs.applyTo(viewBinding.parentCl); |
| | | //// viewBinding.agreementLl.setVisibility(View.GONE); |
| | | // cs.applyTo(viewBinding.homeLoginParentCl); |
| | | // } |
| | | // |
| | | // @Override |
| | | // |
| | | // public void onKeyboardHide() { |
| | | // //Toast.makeText(MainActivity.this,"键盘收回",Toast.LENGTH_SHORT).show(); |
| | | // public void onKeyboardHide(int h) { |
| | | // ConstraintSet cs = new ConstraintSet(); |
| | | // cs.connect(R.id.home_login_title_tv, ConstraintSet.TOP, ConstraintSet.PARENT_ID, ConstraintSet.TOP, 400);// |
| | | // cs.applyTo(viewBinding.parentCl); |
| | | // cs.clone(viewBinding.homeLoginParentCl); |
| | | // cs.connect(R.id.home_login_tv, ConstraintSet.BOTTOM, ConstraintSet.PARENT_ID, ConstraintSet.BOTTOM, h);// |
| | | // //应用约束 |
| | | // cs.applyTo(viewBinding.homeLoginParentCl); |
| | | // } |
| | | // |
| | | // }); |