Application類的使用方法
阿新 • • 發佈:2019-02-19
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.test"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="8" />
<application
android:icon ="@drawable/icon"
android:label="@string/app_name"
android:name="CustomApplication">
<!-- 將我們以前一直用的預設Application設定成自定義的CustomApplication -->
<activity
android:name=".FirstActivity"
android:label="@string/app_name">
<intent-filter >
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name =".SecondActivity"
android:label="@string/app_name">
</activity>
</application>
</manifest>