Android的力水平(横向)布局 [英] Android force Horizontal (landscape) layout

查看:149
本文介绍了Android的力水平(横向)布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是pretty的接近我的第一场比赛为Android讲完了,我遇到一个问题,就是这么简单我敢肯定,我会觉得自己很蠢,不知道如何解决这个问题,但如何我可以强制应用程序留在一个水平布局?现在,如果你打开​​手机(模拟器),它翻转的图形和挤压它们。我想本场比赛开始水平并保持下去,无论用户如何接通电话。

I'm pretty close to finished with my first game for Android, and I've come across a problem that's so simple I'm sure I'll feel stupid for not knowing how to solve it, but how can I force the app to stay in a Horizontal layout? Right now, if you turn the phone (emulator) it flips the graphics and squeezes them. I want the game to start horizontally and stay that way regardless of how the user turns the phone.

感谢你。

推荐答案

打开AndroidManifest.xml中,并添加以下的android:screenOrientation =风景 例如,

Open the AndroidManifest.xml and add the following android:screenOrientation="landscape" e.g.

 <activity android:name=".ActivtyName" 
       android:screenOrientation="landscape"
                >

这篇关于Android的力水平(横向)布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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