Tutorial by Examples

Add code in your Activity. This would work for Fragment also, no need to add this code in Fragment. @Override public boolean dispatchTouchEvent(MotionEvent ev) { View view = getCurrentFocus(); if (view != null && (ev.getAction() == MotionEvent.ACTION_UP || ev.getAction() == Moti...
The idea is to measure a layout before and after each change and if there is a significant change you can be somewhat certain that its the softkeyboard. // A variable to hold the last content layout hight private int mLastContentHeight = 0; private ViewTreeObserver.OnGlobalLayoutListener keyboa...

Page 1 of 1