Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chenshengfa0803/fcd174482f3be49f78336e1255d9006d to your computer and use it in GitHub Desktop.
Save chenshengfa0803/fcd174482f3be49f78336e1255d9006d to your computer and use it in GitHub Desktop.
test gist by shfa.chan
public static InputMethodManager getInstance() {
synchronized (InputMethodManager.class) {
if (sInstance == null) {
IBinder b = ServiceManager.getService(Context.INPUT_METHOD_SERVICE);
IInputMethodManager service = IInputMethodManager.Stub.asInterface(b);
sInstance = new InputMethodManager(service, Looper.getMainLooper());
}
return sInstance;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment