Activity 生命周期

来源:互联网 发布:asp.net php 哪个好 编辑:程序博客网 时间:2024/05/22 07:02



onStart(),onStop用来保存状态等值


An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View)


Activity其实不是显示视图用的,它是一个控制单元,负责与用户进行交互,负责创建Window,然后通过setContentView将UI放置到Window窗口中。


0 0