diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-03-03 05:01:02 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-03-03 05:01:02 +0100 |
commit | c609eefefac5097c7c40a9f1b8741e9634da316f (patch) | |
tree | 53363dfbab46d84e81b8b95f49e586374dc358f0 /src/eu/siacs/conversations/ui/XmppActivity.java | |
parent | 2ab6cb0ada6370e6ea83a73e0a6a39ea3ff90715 (diff) |
api changes. muc options
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/ui/XmppActivity.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java index 5114e640c..569563c1a 100644 --- a/src/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -8,6 +8,8 @@ import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; +import android.view.View; +import android.view.inputmethod.InputMethodManager; public abstract class XmppActivity extends Activity { public XmppConnectionService xmppConnectionService; @@ -48,5 +50,18 @@ public abstract class XmppActivity extends Activity { } } + protected void hideKeyboard() { + InputMethodManager inputManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); + + View focus = getCurrentFocus(); + + if (focus != null) { + + inputManager.hideSoftInputFromWindow( + focus.getWindowToken(), + InputMethodManager.HIDE_NOT_ALWAYS); + } + } + abstract void onBackendConnected(); } |