The problem that launcher cannot take effect after rotating the portrait Screen

Source: Internet
Author: User

@ Override
Protected void onpreparedialog (int id, dialog DIALOG ){
Switch (ID ){
Case dialog_create_shortcut:
Mwaitingforresult = false;
Break;
Case dialog_rename_folder:
If (mfolderinfo! = NULL ){
Edittext input = (edittext) dialog. findviewbyid (R. Id. folder_name );
Final charsequence text = mfolderinfo. title;
Input. settext (text );
Input. setselection (0, text. Length ());
}
Break;
}
}

 

 

This is a bug found in the past 2.1, and it can be found in the past 2.2. It is estimated that Google has changed the bug.

Processing Method: Add mwaitingforresult = false;
This lineCodeOK,

Alternatively, you can directly block the IF (isworkspacelocked ()){
Log. I ("======= launcher ========", "======= isworkspacelocked () ============ ");
Return false;
}

And the interception judgment in dispatchaction in worksapce.

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.