开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜