简体   繁体   中英

How to Launch the SoftKey When Activity Started in android

i want to launch the SoftKeyBoard when activity launch. i tried this code it is working for the potrait mode but it is not working in landscape mode can any one help me to do that thanks in advance.

      InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.toggleSoftInput(0, InputMethodManager.SHOW_IMPLICIT);

do you have a layout-land folder in your workspace? If not, create one and add the xml from the layout folder with the same name. Let me know if it works

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