Set up the Android Startup interface method in the Androidmanifest.xml file

Source: Internet
Author: User
Tags xmlns

like Android Login program and android HelloWorld program, but it is not always correct to run a correct program, depressed for a long time, and finally in one Test after the success of the Android The program in the emulator that runs the self built project. The summary of the program startup interface settings experience is as follows:

In the Android project built by MyEclipse, locate the Androidmanifest.xml file and double-click to open it.

Set the Androidmanifest.xml file code to start the login interface first after the program runs:

<?xml version= "1.0" encoding= "Utf-8"
<manifest xmlns:android= "Http://schemas.android.com/apk/res" /android "
package=" com.gp.acitivity
android:versioncode= "1"
Android:versionname= "1.0"
<!-- Set the version of the ANDROID&NBSP;SDK program running in the emulator
<uses-sdk android:minsdkversion= "8"  android: targetsdkversion= "/>"
<!--get network operation privileges;
<uses-permission android:name= Android.permission.CHANGE_NEWWORK_STATE "/>
<!-- android software running settings;
<application
Android:allowbackup= "true"
android:icon= "@drawable/ic_launcher"
android:label= "@string/app_name"
Android:theme= "@style/apptheme" "
<!--start Online collection and collation of login interface settings;
<activity
Android:name=" Com.gp.acitivity.LoginActivity ""

<!--to set up the first program to start, copy the following code to the specified location-->
<intent-filter>
<action android: Name= "android. Intent.action.MAIN"/>
<category android: Name= "android. Intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!--set up the HelloWorld interface settings for online collection and collation-->
<activity
Android: Name= "com.gp.acitivity.HellowoldActivity" >
</activity>
</application>
</manifest>

Set the Androidmanifest.xml file code to start the HelloWorld interface first after the program is run, as follows:

<?xml version= "1.0" encoding= "Utf-8"
<manifest xmlns:android= "Http://schemas.android.com/apk/res" /android "
package=" com.gp.acitivity
android:versioncode= "1"
Android:versionname= "1.0"
<!-- Set the version of the ANDROID&NBSP;SDK program running in the emulator
<uses-sdk android:minsdkversion= "8"  android: targetsdkversion= "/>"
<!--get network operation privileges;
<uses-permission android:name= Android.permission.CHANGE_NEWWORK_STATE "/>
<!-- android software running settings;
<application
Android:allowbackup= "true"
android:icon= "@drawable/ic_launcher"
android:label= "@string/app_name"

Android : theme= "@style/apptheme"
<!--start the login interface setting on the Internet collection and collation;
<activity
Android : name= "com.gp.acitivity.LoginActivity"
</activity
<!--start HelloWorld interface settings for online collation;
<activity
Android : Name= "com.gp.acitivity.HellowoldActivity"
<!--set up the first program to start, copy the following code to the specified location-
<intent-filter>
<action  android : Name= " Android . Intent.action.MAIN "/>
<category  android : Name=" Android . Intent.category.LAUNCHER "/>
</intent-filter>
</ Activity>
</application>
</manifest>

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.