开发者

Why do you have to 'extend activity' in Android development?

开发者 https://www.devze.com 2023-03-26 18:30 出处:网络
When you create a new class, why must you alway开发者_运维知识库s say for example: class Main extends Activity { ... }

When you create a new class, why must you alway开发者_运维知识库s say for example:

class Main extends Activity { ... }


You don't. When you create a new Activity, it must extends Activity, but you may create any other class as well.

Extending Activity gives you the ready-made UI and resources management and allows the zigote to instantiate you as a GUI application.

0

精彩评论

暂无评论...
验证码 换一张
取 消