简体   繁体   English

android:screenOrientation =“ portrait”在一部中文键盘上不起作用

[英]android:screenOrientation=“portrait” is not working on one Chinese Pad

I have made app and set it to have portrait orientation for main <activity> in ActivityManifest.xml . 我已经制作了应用程序,并将其设置为在ActivityManifest.xml主要<activity>具有portrait方向。 It is portrait on all devices except one Chinese noname pad. 除一个中文noname pad以外,所有设备上的portrait均为portrait There are other apps that handle orientation on that pad correctly. 还有其他应用程序可以正确处理该键盘上的方向。

I expect that in portrait orientation screen width is less then height. 我希望纵向屏幕的宽度小于高度。

My 2 questions are:- 我的两个问题是:

  1. What is the best way to set orientation? 设置方向的最佳方法是什么? Do I have to check screen width/height and rotate screen accordingly? 我是否需要检查屏幕的宽度/高度并相应地旋转屏幕?

  2. How widespread that orientation bug is? 该定位错误有多广泛?

You may see this answer. 您可能会看到答案。 That was for a Jellybean bug but the same code may apply for other versions aswell. 那是针对Jellybean的错误,但相同的代码也可能适用于其他版本。

ActivityManifest.xml way is good enough. ActivityManifest.xml方式就足够好了。 My buggy noname chinese pad is only device that I seen so far. 我的越野车Noname Chinese Pad是到目前为止我所看到的唯一设备。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 android:screenOrientation =“ portrait”在豆形软糖中被忽略 - android:screenOrientation=“portrait” is ignored in Jellybean 如何为相机设置android:screenOrientation =“ portrait” - How to set android:screenOrientation=“portrait” for Camera android:screenOrientation in manifest Portrait/lock 哪个是最好的以及它们之间的区别 - android:screenOrientation in manifest portrait/lock which one is best and difference between them Android studio 3.6 给 android:screenOrientation=&quot;portrait&quot; 划红线,需要更改 android:screenOrientation=&quot;fullSensor&quot; 吗? - Android studio 3.6 give an redline for android:screenOrientation="portrait", need to change android:screenOrientation="fullSensor"? 锁定屏幕方向不是永久的(android:screenOrientation =“纵向”) - Locking screen orientation isn't permanent (android:screenOrientation=“portrait”) "Android Studio 升级后无法再使用 screenOrientation 肖像" - Can no longer use screenOrientation portrait after Android Studio upgrade android:screenOrientation =“ portrait”在运行棉花糖的Nexus 5x上被忽略 - android:screenOrientation=“portrait” ignored on a Nexus 5x running Marshmallow 即使指定了android:screenOrientation =“ portrait”,Android在景观中的启动活动(来自库项目) - Android starting activity (from library project) in landscape even when specified android:screenOrientation=“portrait” 反向肖像在android中不起作用 - reverse portrait not working in android 将 screenOrientation 设置为纵向不起作用 - setting screenOrientation to portrait doesn't work
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM