在平板横向模式只 [英] landscape mode in tablet only

查看:134
本文介绍了在平板横向模式只的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序已经可以支持仅适用于平板电脑横向/纵向模式时,手机将只支持肖像模式。什么是实现这一目标的最佳方式是什么?

My app has to support landscape/portrait mode only for tablets, phones will only support portrait mode. What is the best way to implement this?

这是我正在考虑的选项:

Options that I am considering:

一)使用两个APK文件,一个电话,一个用于平板电脑。一个为手机将在清单中锁定风景模式

a) using two apk files, one for phones and one for tablets. The one for phone will lock landscape mode in the manifest

2)使用一个apk文件。检测设备是每个活动的内部电话,锁定横向模式。

2) using one apk file. Detect that device is a phone, lock landscape mode inside each activity.

任何意见将AP preciated。

any advice will be appreciated.

问候

推荐答案

您可以使用一个超类的活动和实施这一 HTTP:/ /stackoverflow.com/a/9629127/710162 的上,例如,的onCreate()。

You can use a SuperClass for activities and implement this http://stackoverflow.com/a/9629127/710162 on, for example, onCreate().

这篇关于在平板横向模式只的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆