开发者

Is this the correct way to add a second activity to my manifest.xml file

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="com.androidgames"
       android:versionCode="1"
       android:versionName="1.0">
     <uses-sdk android:minSdkVersion="3" />

     <application android:icon="@drawable/icon" android:label="@string/app_name">
         <activity android:name=".AndroidBasicsStarter" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHE开发者_开发技巧R" />
             </intent-filter>
         </activity>

         //New Activity        
         <activty android:label="Life Cycle Test"
                  android:name=".LifeCycleTest"
                  android.configChanges="keyboard|keyboardHidden|orientation" />

     </application>
 </manifest>


That looks good, but consider moving the label to the strings resource file :)

In this case your activity should match a LifeCycleTest class in the root of your package (com.androidgames).


Yep, that's about the sum of it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜