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

有些应用会横竖屏切换, 结果使用插件方式会导致app挂掉 #294

Open
weikano opened this issue Dec 17, 2016 · 8 comments
Open

Comments

@weikano
Copy link

weikano commented Dec 17, 2016

暂时解决方法是把所有library里面的activity增加android:configChanges="screenSize|orientation|keyboardHidden", 不知道是否能动态修改

@LLbgithub
Copy link

可以反射系统的方法来修改具体参考http:https://greenrobot.me/devpost/android-main-thread-2/

@weikano
Copy link
Author

weikano commented Dec 23, 2016

@LLbgithub 把RELAUNCH_ACTIVITY这条message移除掉吗?

@qiaoshouqing
Copy link

问一下,你们都是横竖屏切换时肯定会出问题吗?我试了一下没事啊。。

@LLbgithub
Copy link

@weikano 是的,改成一个没有意义的值,他就不会重启了

@weikano
Copy link
Author

weikano commented Dec 26, 2016

@LLbgithub 就是不知道会不会影响到其他的地方. 我在想有没有办法动态修改stub activity的configChanges?
@qiaoshouqing 试下从一个竖屏界面跳转到横屏界面, 然后再返回竖屏界面

@qiaoshouqing
Copy link

我试了一下,从一个竖屏界面跳转到横屏界面, 然后再返回竖屏界面,依然没问题啊。。

@LLbgithub
Copy link

@weikano 我是在当前的Activity里面修改的,然后因为他就是一条消息,所以不会有什么影响,@qiaoshouqing 你的界面是不是不用担心横竖屏重启的问题?

@weikano
Copy link
Author

weikano commented Dec 28, 2016

@LLbgithub 其实可以再根据configChanges再多配置些stub activity, 这样可以避免同一个Activity允许横竖屏切换情况, 只是这样stub 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