如何在不同的包中定义activity?

我把程序分割到几个不同的包中。一些类继承Activity,位于com.tmt.app。另外一个Activity在Dialogs包中。这两个包都位于src文件夹下面,在Manifest文件中我是这样指定包名的:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tmt.app"
android:versionCode="1"
android:versionName="1.0" >

这表明这个 manifest 与包 com.tmt.app 有关,相关的类如下:

<activity
        android:name=".PasswordDialog"
        android:theme="@style/AboutTheme"
        android:screenOrientation="portrait" >
    </activity>

这表明 PasswordDialog 类在包 com.tmt.app 中。
如何把这个类放在Dialogs包中?

你需要写出完整的包名+类名 ,假如你的类在 con.tmt.dialog包中,
android:name="com.tmt.dialog.PasswordDialog"
android:theme="@style/AboutTheme"
android:screenOrientation="portrait" >

com.tmt.app这是基础包 application包位置
需要dialogs包可以在com.tmt.app.dialogs
mainfiest中就可以这样写了

    <activity
        android:name=".dialogs.PasswordDialog"
        android:theme="@style/AboutTheme"
        android:screenOrientation="portrait" >
    </activity>

或者

    <activity
        android:name="com.tmt.app.dialogs.PasswordDialog"
        android:theme="@style/AboutTheme"
        android:screenOrientation="portrait" >
    </activity>