简体   繁体   中英

How to show emoji keyboard programatically android?

I have a smiley button, i want to create smiley button than show emoji keyboard on android directly. It's any suggestion to show emoji keyboard in onClick event? here the scenario

public static void chooseKeyboard(Activity activity) {
        InputMethodManager imm = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);

        View view = activity.getCurrentFocus();

        if (view == null) {
            view = new View(activity);
        }
        imm.showInputMethodPicker();
    }

call it and choose keyboard.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM