我最近使用 Eclipse 开发了一个 android 游戏。我真的是这方面的新手,所以如果我要问的内容太简单,请原谅我。>.<
该应用程序在 Eclipse 中安装的 Android 模拟器中运行并且看起来完美。但是,当我们尝试将其安装在屏幕明显比模拟器大的三星 Galaxy 选项卡中时,布局变得一团糟。按钮的顺序不正确等。我确实有使用 XML 布局的屏幕,有些是带有精灵的简单画布。知道如何将模拟器中的原始布局保留到平板电脑吗?我试过使用RelativeLayout
而不是,LinearLayout
但它仍然不起作用。
任何帮助,将不胜感激。谢谢!
一个 XML 文件代码及其对应的模拟器屏幕如下所示。
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/MenuLayout" >
<Button android:id="@+id/btnNew"
android:layout_width="140px"
android:layout_height="65px"
android:layout_marginTop="160px"
android:background="@drawable/newgame"/>
<Button android:id="@+id/btnInst"
android:layout_width="140px"
android:layout_height="65px"
android:background="@drawable/instructions" />
<Button android:id="@+id/btnCredits"
android:layout_width="140px"
android:layout_height="65px"
android:background="@drawable/credits"/>
<Button android:id="@+id/btnExit"
android:layout_width="140px"
android:layout_height="65px"
android:background="@drawable/exit"/> </LinearLayout>