Android's manifest file detailed

Source: Internet
Author: User
Tags filter xmlns

Manifest can define the structure and meta arrays of applications and their components and requirements.

Android Docs: http://developer.android.com/guide/topics/manifest/manifest-element.html

Hello_world, Androidmanifest.xml:

<?xml version= "1.0" encoding= "Utf-8"?> <manifest xmlns:android=  
"http://schemas.android.com/apk/res/" Android "
    package=" Mzx.spike.hello_world.app >  
      
    <application
        android:allowbackup= "true"
        android:icon= "@drawable/ic_launcher"
        android:label= "@string/app_name"
        android:theme= "@style/apptheme" >  
        <activity
            android:name= "mzx.spike.hello_world.app.MainActivity"
            android:label= "@string App_name ">  
            <intent-filter>  
                <action android:name=" Android.intent.action.MAIN "  />  
      
                <category android:name= "Android.intent.category.LAUNCHER"  />  
            </intent-filter>  
        </activity>  
    </application>  
      
</manifest>

Xmlns:xml namespace's shorthand, Android namespace;

Package: The name of the package used by the program;

The application:manifest must contain nodes (must contain), using various attributes to specify the various metadata for the application;

Activity:application Optional tag that declares an activity (subclasses of the activities), and implements some of the functionality of the application's visual user interface (Visual users interface);

Intent-filter: Purpose filter, which initiates the intent of the activity (purpose);

Action:intent-filter the required (must contain) label, the purpose of the filter activity;

Category:intent-filter Optional (can contain) label, the type of the purpose filter;

In the action and category inside, the name attribute meaning, in the intent document has the annotation;

Documents: http://developer.android.com/reference/android/content/Intent.html

Manifest can also use the Android Manifest Editor (Eclipse) to manage XML, interface management;

There is no such function in Android Studio for the time being;

Author: csdn Blog spike_king

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/

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.