简体   繁体   English

class 中的多个活动?

[英]Multiple activities within a class?

So what I want to do is this.所以我想做的就是这个。 I want to have a class that contains other classes which start activities, but I'm not sure if its possible, or even a good idea.我想要一个 class 包含其他启动活动的类,但我不确定它是否可能,甚至是一个好主意。 An Example:一个例子:

public class General{
     public class Activity1 extends Activity{
          //Start Activity
     }
}

Is there a way to call such an activity?有没有办法调用这样的活动?

So the solution I chose to go with was to use packages.所以我选择 go 的解决方案是使用包。 After reading about it here http://developer.android.com/guide/topics/manifest/manifest-intro.html and here Android: Including multiple Java Packages to Manifest , it seems like a better method to do what I stated above. After reading about it here http://developer.android.com/guide/topics/manifest/manifest-intro.html and here Android: Including multiple Java Packages to Manifest , it seems like a better method to do what I stated above.

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM