我在包com.qz.launchfoneclayactivity中有一個活動。我需要在包com.qz.Test中啓動一個活動。我試着設置組分與SetClass也沒有幫助,但...下面是我com.qz.launchfoneclayactivity的清單從另一個包中調用活動
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.qz.launchfoneclayactivity"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity android:name="com.x.test.StartUpActivity" />// This is the Activity name in another package
<activity
android:name="com.qz.launchfoneclayactivity.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>
下面
是我的第二個包
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.qz.test"
android:versionCode="xx"
android:versionName="x.x.x">
......................
<activity android:name=".StartUpActivity"
android:launchMode="singleTop"
android:excludeFromRecents="true"
android:configChanges="orientation|screenSize|keyboardHidden"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
是否想通過該活動啓動您的應用,或者是從其他活動開始該活動? –
除了這些xml文件之外,您還可以在其他活動中顯示您的代碼,您嘗試從其他活動開始此活動。 – Kanth