Some Android phones cceditbox input after the keyboard input box does not disappear the problem

Source: Internet
Author: User



Use 2s to do login interface, use to Cceditbox, after input, the keyboard can be moved down, but the screen is still displayed on the keyboard itself to enter the box, then click on the screen anywhere can not take the input box to kill.



Why iOS doesn't have these Android trivial problems, workaround: Need to modify src/org.cocos2dx.lib/



Cocos2dxeditboxdialog.java This class, so that it can do click on the screen, the keyboard input box into the contents of the Cceditbox inside, and the keyboard input box to kill.


@Overrideprotected voidOnCreate (FinalBundle psavedinstancestate) { Super. OnCreate (psavedinstancestate);  This. GetWindow (). Setbackgrounddrawable (NewColordrawable (0x80000000)); FinalLinearLayout layout =NewLinearLayout ( This. GetContext ());        Layout.setorientation (linearlayout.vertical); //Add the following codeLayout.setonclicklistener (NewView.onclicklistener () {@Override Public voidOnClick (View v) {//TODO auto-generated Method StubCocos2dxhelper.setedittextdialogresult (Cocos2dxeditboxdialog. This. Minputedittext.gettext (). toString ()); Cocos2dxeditboxdialog. This. Closekeyboard (); Cocos2dxeditboxdialog. This. Dismiss ();        }        }); //========= FinalLinearlayout.layoutparams Layoutparams =NewLinearlayout.layoutparams (ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);





Some Android phones cceditbox input after the keyboard input box does not disappear the problem


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.