Docs say:
The visible lifetime of an activity happens between a call to
onStart()
until a corresponding call toonStop()
.
Also in this one you can see:
The
onStart()
call makes the activity visible to the user ...
So I thought the UI of Activity must be visible after returning from onStart()
.
Recently, for testing purpose, I put an infinite loop in onResume()
and guessed that the UI of Activity must be visible. But the result of starting Activity was a white window without any UI.
So it seems that UI of Activity will be visible after returning from onResume()
instead of returning from onStart()
. Is this true? If yes, why docs do say such misleading statements?
Edit:
You may think like Công Hải which says:
I think the documents mention about window visible not view visible.
But I do not think that "visibility" means above mentioned "white window"; because if you put an infinite loop in onCreate()
, result of starting Activity again will be a white window, while as docs say the onCreate()
is not in "visible lifetime" of Activity. So "visibility of Activity" must mean another thing than "white window".
Edit2
Alongside official docs, many tutorials say the Activity will be visible by calling onStart()
and interactive by calling onResume()
. Are they all say incorrect thing without testing?
onResume
? – AcnodeonResume()
and starting the Activity, causes a frozen white window. – Watanabe