android软键盘弹出引起的各种不适终极解决方案 以下描述如何解决ListView高度小于0时出现的UI问题. 创建RelativeLayout的子类TxrjRelativeLayout public class TxrjRelativeLayout extends RelativeLayout { private int count = 0; public TxrjRelativeLayout(Context context, AttributeSet attrs) {
private void listenerSoftInput() { final View activityRootView = findViewById(R.id.activityRoot); activityRootView.getViewTreeObserver().addOnGlobalLayoutListener( new OnGlobalLayoutListener() { @Override public void onGlobalLayout() { int heightDiff