android - android 何时真正呈现并显示 Activity ?

标签 android android-layout

我试图了解 Android 操作系统在哪个阶段呈现布局,以便能够访问我的 ListView 中的 View 。谢谢

最佳答案

布局在 onCreate() 中创建:

The entire lifetime of an activity happens between the first call to onCreate(Bundle) through to a single final call to onDestroy().

enter image description here

Activity 从 onStart() 可见:

The visible lifetime of an activity happens between a call to onStart() until a corresponding call to onStop(). During this time the user can see the activity on-screen

来源:documentation .

关于android - android 何时真正呈现并显示 Activity ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14086014/

相关文章:

java - 如何获取 Gradle 中生命周期库的版本?

java - 我的 Android tic-tac-toe 游戏中的 checkForWin() 方法总是放错积分

android - 当 ExpandableListView 扩展时,CheckBoxes 自动取消选中

android - 如何应用大比例风景图像

android - 从 fragment 类主 Activity 调用自定义 ListView 适配器

android - 注销多个 LocationListener

android - AIDE中的assets文件夹放在哪里?

android - 我希望布局的 subview 随媒体播放器当前位置自动更改

Android 图像在模拟器中变得模糊

android - TextInputLayout 错误文本有一些额外的空间,但另一个项目甚至没有相同的样式