landscape mode in tablet only

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:

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

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

any advice will be appreciated.

Regards


您可以使用SuperClass进行活动并在onCreate()上实现此https://stackoverflow.com/a/9629127/710162。

链接地址: http://www.djcxy.com/p/6474.html

上一篇: 在C ++代码中实例化模板

下一篇: 只在平板电脑上使用横向模