gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 03:51:29 27 4
gpt4 key购买 nike

我试图了解 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com