Nested inner Activity class in android

后端 未结 3 2070
悲&欢浪女
悲&欢浪女 2021-01-18 01:16

Is declaring a class that extends Activity inside another Activity class possible? If it is, how would I register that class in the manifest? Also, is that something that ca

3条回答
  •  醉话见心
    2021-01-18 01:36

    No, that's not possible. After all, the Android operating system will need to instantiate the Activity if it is started at any point (say, if you start it through an intent), and it's impossible to instantiate an ItemClass without a parent ListClass.

    Remember that each Activity is completely independent and can be started at any point through an intent.

提交回复
热议问题