Detect keyboard in android -
i have android application contain list of installed applications , launch them on item click.in application used intent.action_close_system_dialog broadcast closing system dialogs such task manager(recent apps dialog),power option dialog,low battery dialog etc....but hides keyboard in devices.i want make sure user not interact recent apps dialog applications.how can close system dialogs except keyboard?how can check whether keyboard visible or not?is possible detect recent apps dialog?i stuck on hours.any must appreciating.
i've used code detect keyboard.
view.getviewtreeobserver().addongloballayoutlistener( new ongloballayoutlistener() { @override public void ongloballayout() { int heightdiff = view.getrootview().getheight() - view.getheight(); if (heightdiff > 200) { keyboardup = true; return; } if (keyboardup) { keyboardup = false; } log.e("keyboard", "" + keyboardup); } });
Comments
Post a Comment