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 OnCreate 执行两次 #149

Open
lan603168 opened this issue Mar 24, 2016 · 1 comment
Open

Activity OnCreate 执行两次 #149

lan603168 opened this issue Mar 24, 2016 · 1 comment

Comments

@lan603168
Copy link

我在看demo的时候,发现一个现象,如果在插件的第一个启动Activity加一个android:screenOrientation="landscape"属性,则该Activity会执行两次OnCreate方法,生命周期比较混乱,没闪退,也没有错误日志....... 下图是Activity的配置,插件的
j84vo etwqf9dmx8zlu5xxg
。后来我自己尝试也在宿主注册的Activity加上同样的属性,则没有出现类型的情况了,但是这样的话,如果插件的其他Activity也有这个android:screenOrientation属性设置,而宿舍注册的没有,也会有这个情况,也会导致两次OnCreate方法。这个是要我每一个android:screenOrientation的值都注册一次吗?希望能得到 @cmzy 的回答,谢谢

@liuchenx
Copy link
Contributor

这个问题的原因是 设置横竖屏的操作在插件中都是采用动态设置的

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

2 participants