Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于Activity可见与前台的区分? #2

Open
kyze8439690 opened this issue Sep 16, 2015 · 6 comments
Open

关于Activity可见与前台的区分? #2

kyze8439690 opened this issue Sep 16, 2015 · 6 comments

Comments

@kyze8439690
Copy link

在第一章中经常看到”可见“和”前台“两个概念。

@kyze8439690
Copy link
Author

前台必定可见,可见未必前台?

@singwhatiwanna
Copy link
Owner

@kyze8439690
前台必定可见,可见未必前台?这句话很对,“可见”我们可以理解为这个Activity已经出来了,但是它有可能被其他界面所覆盖而位于后台。

@kyze8439690
Copy link
Author

再求教一个问题,可以覆盖在Activity上的有dialog,popupwindow,toast。只有dialog会占用前台?

@singwhatiwanna
Copy link
Owner

@kyze8439690 “可以覆盖在Activity上的有dialog,popupwindow,toast。只有dialog会占用前台?”
这个问题稍微复杂,或者说换一种方式描述会更好理解,启动一个新Activity时,onResume时Activity就已经可见,但是并未来到前台。

@kyze8439690
Copy link
Author

看来不能从语义上理解,可见只是一种状态,而不是意义上的可见?

或者说activity启动的时候能看见windowBackground就是可见,看见contentView就是前台?

@kyze8439690 https://github.com/kyze8439690
“可以覆盖在Activity上的有dialog,popupwindow,toast。只有dialog会占用前台?”
这个问题稍微复杂,或者说换一种方式描述会更好理解,启动一个新Activity时,onResume时Activity就已经可见,但是并未来到前台。


Reply to this email directly or view it on GitHub
#2 (comment)
.

@yugimaster
Copy link

"可见"是不是可以理解Activity已经被创建,它可能正好处于前台这个状态,也有可能在后台等待再次唤起。"前台"应该是“可见”中的一种状态。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants