androidMainfest.xml中的设置activity是怎么设置弹出第一个activity,还有<activity></activity>下面的全部属性是怎么回事?或谁有比较好的androidmainfest.xml资料可以介绍过来,谢谢各位大虾先!

解决方案 »

  1.   

    好像第一个activity配置中有几个内嵌的标签 代表程序第一次启动加载的Activity
    好吧 初次接触Android
      

  2.   

    http://hi.baidu.com/zzliru/blog/item/22689503d180a3014bfb51b2.html 
      

  3.   

    <category android:name="android.intent.category.LAUNCHER" /> 
    这个是决定哪个activity 在屏幕上显示的,启动模拟器的时候,你可以看到,error log里都有个错误,是找不到面板,也是这个引起的,但不影响使用
      

  4.   


        <activity android:name=".MyTabhost"
                      android:label="@string/app_name">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>其中<intent><intent>标签里面的内容是设置开始运行.myTabhost这个Activity的,
    这个两句话只能出现一次。也就说只能给一个activity设置。
      

  5.   

    androidMainfest.xml可以有两个activity,主要用于页面跳转。
      

  6.   


    楼上的说发错了,<intent-filter>可以在多个Activity中出现的,这样会在LAUNCHER中出现多个应用程序的启动图标,点击会进入对应的Activity
      

  7.   


    楼上的说发错了,<intent-filter>可以在多个Activity中出现的,这样会在LAUNCHER中出现多个应用程序的启动图标,点击会进入对应的Activity
      

  8.   

    看sdk文档的dev guide写的很清楚啊
      

  9.   

    这个文件里都是ACTIVITY的属性设置
      

  10.   

    帮你贴出来:
    慢慢看吧:
    The AndroidManifest.xml File
    Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code. Among other things, the manifest does the following:It names the Java package for the application. The package name serves as a unique identifier for the application.
    It describes the components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. It names the classes that implement each of the components and publishes their capabilities (for example, which Intent messages they can handle). These declarations let the Android system know what the components are and under what conditions they can be launched.
    It determines which processes will host application components.
    It declares which permissions the application must have in order to access protected parts of the API and interact with other applications.
    It also declares the permissions that others are required to have in order to interact with the application's components.
    It lists the Instrumentation classes that provide profiling and other information as the application is running. These declarations are present in the manifest only while the application is being developed and tested; they're removed before the application is published.
    It declares the minimum level of the Android API that the application requires.
    It lists the libraries that the application must be linked against.Structure of the Manifest FileThe diagram below shows the general structure of the manifest file and every element that it can contain. Each element, along with all of its attributes, is documented in full in a separate file. To view detailed information about any element, click on the element name in the diagram, in the alphabetical list of elements that follows the diagram, or on any other mention of the element name.
    <?xml version="1.0" encoding="utf-8"?><manifest>    <uses-permission />
        <permission />
        <permission-tree />
        <permission-group />
        <instrumentation />
        <uses-sdk />
        <uses-configuration />  
        <uses-feature />  
        <supports-screens />      <application>        <activity>
                <intent-filter>
                    <action />
                    <category />
                    <data />
                </intent-filter>
                <meta-data />
            </activity>        <activity-alias>
                <intent-filter> . . . </intent-filter>
                <meta-data />
            </activity-alias>        <service>
                <intent-filter> . . . </intent-filter>
                <meta-data/>
            </service>        <receiver>
                <intent-filter> . . . </intent-filter>
                <meta-data />
            </receiver>        <provider>
                <grant-uri-permission />
                <meta-data />
            </provider>        <uses-library />    </application></manifest>All the elements that can appear in the manifest file are listed below in alphabetical order. These are the only legal elements; you cannot add your own elements or attributes.<action> 
    <activity> 
    <activity-alias> 
    <application> 
    <category> 
    <data> 
    <grant-uri-permission> 
    <instrumentation> 
    <intent-filter> 
    <manifest> 
    <meta-data> 
    <permission> 
    <permission-group> 
    <permission-tree> 
    <provider> 
    <receiver> 
    <service> 
    <supports-screens> 
    <uses-configuration> 
    <uses-feature> 
    <uses-library> 
    <uses-permission> 
    <uses-sdk>File ConventionsSome conventions and rules apply generally to all elements and attributes in the manifest:Elements
    Only the <manifest> and <application> elements are required, they each must be present and can occur only once. Most of the others can occur many times or not at all — although at least some of them must be present for the manifest to accomplish anything meaningful.
    If an element contains anything at all, it contains other elements. All values are set through attributes, not as character data within an element.
    Elements at the same level are generally not ordered. For example, <activity>, <provider>, and <service> elements can be intermixed in any sequence. (An <activity-alias> element is the exception to this rule: It must follow the <activity> it is an alias for.)
    Attributes
    In a formal sense, all attributes are optional. However, there are some that must be specified for an element to accomplish its purpose. Use the documentation as a guide. For truly optional attributes, it mentions a default value or states what happens in the absence of a specification.
    Except for some attributes of the root <manifest> element, all attribute names begin with an android: prefix — for example, android:alwaysRetainTaskState. Because the prefix is universal, the documentation generally omits it when referring to attributes by name.
    Declaring class names
    Many elements correspond to Java objects, including elements for the application itself (the <application> element) and its principal components — activities (<activity>), services (<service>), broadcast receivers (<receiver>), and content providers (<provider>).
    If you define a subclass, as you almost always would for the component classes (Activity, Service, BroadcastReceiver, and ContentProvider), the subclass is declared through a name attribute. The name must include the full package designation. For example, an Service subclass might be declared as follows:
    <manifest . . . >
        <application . . . >
            <service android:name="com.example.project.SecretService" . . . >
                . . .
            </service>
            . . .
        </application>
    </manifest>
    However, as a shorthand, if the first character of the string is a period, the string is appended to the application's package name (as specified by the <manifest> element's package attribute). The following assignment is the same as the one above:
    <manifest package="com.example.project" . . . >
        <application . . . >
            <service android:name=".SecretService" . . . >
                . . .
            </service>
            . . .
        </application>
    </manifest>
    When starting a component, Android creates an instance of the named subclass. If a subclass isn't specified, it creates an instance of the base class.
    Multiple values
    If more than one value can be specified, the element is almost always repeated, rather than listing multiple values within a single element. For example, an intent filter can list several actions:
    <intent-filter . . . >
        <action android:name="android.intent.action.EDIT" />
        <action android:name="android.intent.action.INSERT" />
        <action android:name="android.intent.action.DELETE" />
        . . .
    </intent-filter>
    Resource values
    Some attributes have values that can be displayed to users — for example, a label and an icon for an activity. The values of these attributes should be localized and therefore set from a resource or theme. Resource values are expressed in the following format,
    @[package:]type:name
    where the package name can be omitted if the resource is in the same package as the application, type is a type of resource — such as "string" or "drawable" — and name is the name that identifies the specific resource. For example:
    <activity android:icon="@drawable/smallPic" . . . >
    Values from a theme are expressed in a similar manner, but with an initial '?' rather than '@':
    ?[package:]type:name
    String values
    Where an attribute value is a string, double backslashes ('\\') must be used to escape characters — for example, '\\n' for a newline or '\\uxxxx' for a Unicode character.