Modify the default screenorientation for the air for Android Manifest.xml

Source: Internet
Author: User

In recent work there is a need to modify the android:screenorientation= "user" in the APK generated by air for Android to android:screenorientation= "Landscape". The reason is that some Platform SDK access air for Android will appear when the home key returns the interface disappears, Starling loses focus bug. If changed to android:screenorientation= "Landscape", android:launchmode= "standard" can solve this problem.

This is what is generated by default:

Need to be modified to:

Android:launchmode= "Standard" is easy to modify, go directly to the default generated project under Modify Main-app.xml (This is my project, your project name may not be the case). Add one line: android:launchmode= "Standard"

But android:screenorientation= "Landscape" This change is more troublesome, if directly like the above will be in the packaging when the error. What do we do?

I refer to other people's methods, directly modify the Adt.jar under the Air SDK. Because air must have a default configuration, the default configuration is to configure Android:screenorientation as "user". All we need to do is modify it.

The method of modification is very simple, directly with the command line: (Run the need to configure the Java environment)

?
1 2 3 4 @echo off jar tf adt.jar //列出adt.jar文件目录 jar xf adt.jar  com/adobe/air/apk/AndroidManifest_template.xml //解压出要修改的文件pause //暂停的过程中修改AndroidManifest_template.xml
?
1 jar uf adt.jar com/adobe/air/apk/AndroidManifest_template.xml //更新adt.jar下的文件<br>echo =========== over ============== <br>echo 再点一下就结束了 pause

This creates a new Adt.jar. into the SDK directory. RePack. Has it been modified?

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.