-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: Support setting the horizontal and vertical screen orientation … #1258
Conversation
感谢贡献代码。这个PR看起来很干净,应该很好合入。目前CI检查已经有点报错。你可以自己修改提交,或者我可以晚些帮你改好合入。 |
CI会检查每个提交,而不仅仅是最终状态。所以你需要rebase提交,然后force push。 |
257a87c
to
6f79750
Compare
现在应该可以了 |
你看这个PR还是包含两个提交,这应该是不对的。你应该把第二个fix提交合并到最初的提交中。同时修改最初的提交的commit message,使其通过检查。code format检查确实是只检查最终代码,但是commit message检查是要检查每一个提交的。 |
非常抱歉,似乎还有问题,我将再次检查一下代码在进行force push |
好的,非常抱歉。我这就更改 |
另外你如果愿意自己动手的话,也可以在自己fork的仓库开启github action。这样可以在自己的仓库触发同样的CI检查。 |
f36245d
to
21fa9f8
Compare
好的,最后一次我已经检验过了,再次感谢您的指点 |
21fa9f8
to
db9a6a9
Compare
非常抱歉,最后一次多了一个.字符忘记删,已修正 |
检测已经通过,代码似乎还需您review一下才能进去 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
两个问题。1是前面评论的3次取同一域变量的问题。2是commit message可以清楚的写出来是怎么support的,即判断requestedOrientation和插件manifest中不一致时主动设置它。
if (pluginActivityInfo.screenOrientation != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED && pluginActivityInfo.screenOrientation != pluginActivity.requestedOrientation) { | ||
pluginActivity.requestedOrientation = pluginActivityInfo.screenOrientation | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pluginActivityInfo.screenOrientation
重复出现了3次。应该先赋值给局部变量,再使用,表达出3处值是同一个不变值。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,已修正,重新force push了
db9a6a9
to
b378586
Compare
判断requestedOrientation和插件manifest中不一致时主动设置它
b378586
to
67da8b3
Compare
done🎉 |
Support setting the horizontal and vertical screen orientation in the plugin's AndroidManifest. And set the TestActivityOrientation direction in AndroidManifest to landscape