简体   繁体   English

一项以上的家长活动-如何?

[英]More than one Parent Activity - How to?

Helo, 直升机,

I want to have my app to do a config for different clouds. 我想让我的应用程序针对不同的云进行配置。

So I need for every cloud a unique class. 因此,对于每个云,我都需要一个独特的课程。 For example this would call the Google Drive class: 例如,这将调用Google云端硬盘类:

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

For a configuration with Dropbox I need: 对于使用Dropbox的配置,我需要:

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

After the cloud configuration the app should return back to "normal" configuration. 在进行云配置后,该应用应返回到“常规”配置。

So it should behave like this: 因此它的行为应如下所示:

Class diagramm 类图

In class A the user can choose the cloud. 在A类中,用户可以选择云。

Then in class B and C the cloud will be configured. 然后在B和C类中将配置云。

And back to class D the user can do additional app configuration. 回到D类,用户可以执行其他应用程序配置。

What do I need to write in the AndroidManifest.xml file? 我需要在AndroidManifest.xml文件中写什么?

You should use Intent . 您应该使用Intent

From Activity A, send type, say ia String value which shows the type of Cloud like "gdrive", "dropbox" etc. 从活动A发送类型,例如ia字符串值,该值显示云的类型,例如“ gdrive”,“ dropbox”等。

In Activity B, get the type String, if it equals "gdrive" > Do GDrive Operation else if it equals "dropbox" > Do Dropbox operation... 在活动B中,如果类型等于“ gdrive”>执行GDrive操作,则获取字符串类型,否则,如果其等于“ dropbox”>执行Dropbox操作,则获取字符串类型...

Similarly, Send your data from B > C > D > E 同样,从B> C> D> E发送数据

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为多个活动恢复屏幕活动? - How do I resume screen activity for more than one activity? 如何在活动中使用多个广播? - How can I use more than one Broadcast in activity? Android Mvvm,具有多个活动的应用程序 - Android Mvvm, app with more than one activity 如何在一个活动中将一个界面用于两个以上的后台Android任务? - How one interface can be used for more than two background android tasks within one activity? Android上一个Activity是否可以有多个Java类? - Is it possible to have more than one java class for one Activity on android? 如何获取ToggleButton来识别Android活动中的多个单击? - How do I get a ToggleButton to recognize more than one click in an Android activity? 如何将java活动中的多个变量传递给javaclass? - How can i pass more than one varible from a java activity to a javaclass? 如何在 Activity 上添加多个片段的同时划分 android 的操作栏 - How can I divide the Action bar of android while adding more than one fragment on Activity 如何使用多个扩展活动的列表项单击来实现onClicklistener - How to use more than one list item click that extends Activity implements onClicklistener 如何从 Kotlin 的主要活动中打开多个活动? - How to open more than activity from Main Activity in Kotlin?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM