不止一个父 Activity - 如何?

More than one Parent Activity - How to?

你好,

我想让我的应用程序针对不同的云进行配置。

所以我需要每朵云都独一无二 class。例如,这将调用 Google 驱动器 class:

                    Intent i = new Intent(RecordConfigStep2.this, RecordConfigStep3_GDrive.class);
                    startActivityForResult(i, 1);

对于 Dropbox 的配置,我需要:

                    Intent i = new Intent(RecordConfigStep2.this, RecordConfigStep3_Dropbox.class);
                    startActivityForResult(i, 1);

云配置后,应用程序应 return 返回 "normal" 配置。

所以它应该像这样:

Class diagramm

在classA中用户可以选择云。

然后在classB和C中配置云。

然后返回 class D 用户可以进行额外的应用程序配置。

我需要在AndroidManifest.xml文件中写什么?

你应该使用 Intent.

来自Activity A,发送类型,说我一个字符串值,显示云的类型,如"gdrive","dropbox"等

在Activity B中,获取类型字符串,如果等于"gdrive" > 执行GDrive操作,否则如果等于"dropbox" > 执行Dropbox操作...

同样,从 B > C > D > E 发送数据

更多信息:https://developer.android.com/reference/android/content/Intent