Is disabling landscape mode unforgivable?

帅比萌擦擦* 提交于 2019-12-10 20:01:52

问题


Our application could support landscape mode without any problem, but it is such a pain that we are thinking about forcing portrait mode.

Question: Is it BAD?

The main problem is that changing orientation generates random crashes on many screens. Avoiding those crashes would potentially allow us to spend more time on the core aspects of the app. Will the same crashes happen when users switch apps anyway?

Also, are there landscape-oriented devices where our app will become useless?


回答1:


There is one area that might be unforgivable.

If a user interacts a lot with your app using a virtual keyboard, you should be vary of one thing:

There are emerging Android phones with a sliding physical keyboard that's meant to be used only in landscape mode. An example of such a device is a HTC G1.

Since such Androids are usually a premium, their users are very proud of having a physical keyboards. And if your app doesn't allow them to use their keyboard when they can use it, they will hate your guts for it and they might even give you negative ratings on Android app. market. Yes, it sounds cruel, but that's life.

Otherwise, having a portrait mode only application that runs well and isn't buggy is more than acceptable.

Moral of the story: try to make as many of your customers happy as possible. You won't always succeed, but you might fail if you piss even a minority of them off.




回答2:


An unstable app or an app with a poorly thought out, landscape-unfriendly UI is much worse than an app with is limited to portrait.

There are probably some devices where a portrait-only application would be unwieldy, but the majority would handle it ok. Your best bet is to limit the orientation until the Android landscape or your business priorities make it more important to support those devices.




回答3:


The crashes are probably caused by the activity restarting when changing orientation. With a configuration change you can prevent that without forcing the app to be in portrait mode all the time. Add the config changes line and it will prevent the activity from restarting.

<activity 
android:name=".active.help.HelpMenu" 
android:label="@string/help_string"
android:configChanges="keyboardHidden|orientation">


来源:https://stackoverflow.com/questions/4510526/is-disabling-landscape-mode-unforgivable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!