How to know if keyboard (dis)appears in Android? -


i have edittext , want give more lines when keyboard appears. looking "onkeyboardappearslistener" can't find it. think must exist, perhaps in different way...

you have @override onconfigurationchanged able handle runtime changes:

@override public void onconfigurationchanged(configuration newconfig) {     super.onconfigurationchanged(newconfig);      // checks whether hardware or on-screen keyboard available     if (newconfig.keyboardhidden == configuration.keyboardhidden_no) {         toast.maketext(this, "keyboard visible", toast.length_short).show();     } else if (newconfig.keyboardhidden == configuration.keyboardhidden_yes) {         toast.maketext(this, "keyboard hidden", toast.length_short).show();     } } 

example taken here. take here keyboard related (among others) fields might want use.


edit (rivierakid): changed take account of hard or on-screen keyboard.


Comments

Popular posts from this blog

haskell - Using filter on an item in a list? -

c# - When does PreApplicationStartMethod actually get triggered to run? -

tomcat6 - Exception when stopping container for a with Spring + Quartz + Tomcat web application -