使离子模式以横向模式打开应用 [英] Making ionic to open apps in landscape mode

查看:63
本文介绍了使离子模式以横向模式打开应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用离子框架编写了一个应用程序.但是它以纵向模式打开.我希望它以landscape模式打开.在phonegap中,我们有一个全局config.xml文件,可以在其中使用 <preference name="orientation" value="landscape" />.离子有类似的方法吗?

I wrote an app by using ionic framework. But it opens in portrait mode. I want it to open in landscape mode. In phonegap, we have a global config.xml file where we can use <preference name="orientation" value="landscape" />. Is there any similar method for ionic?

推荐答案

在您的android清单文件中,将此android:screenOrientation="portrait"更改为 android:screenOrientation="landscape".这对我来说很好

In your android manifest file change this android:screenOrientation="portrait" to android:screenOrientation="landscape".This will work fine for me

这篇关于使离子模式以横向模式打开应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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