我做了我的布局基于模拟器,但只是在实际设备上运行我的应用程序,所有的布局搞砸了。我不知道如何解决它。这里是我的XML文件中的代码,Android布局搞砸了电话
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/mainback" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="23dip"
android:layout_marginRight="15dip"
android:layout_marginTop="255dip"
android:orientation="vertical" >
<TextView
android:layout_width="276dp"
android:layout_height="132dp"
android:textSize="15dp"
android:gravity="center_vertical"
android:text="some text"
android:textColor="#4C2016"/>
<Button
android:id="@+id/special"
android:layout_width="131dp"
android:layout_height="40dp"
android:background="@drawable/cc"
android:layout_marginTop="20dip"
android:layout_marginLeft="75dip"
android:textSize="17dp"
android:textStyle="bold"
android:text="Specials"
android:textColor="#F6E6C6" />
</LinearLayout>
`
这将是真棒一些人能告诉我如何解决此问题的代码
这里是什么样子的快照xml文件
这是怎么看起来像在手机上,
图像和橙色文本是背景图像的一部分,并且textview和按钮被添加到视图中。
下你有没有在手机上的穷人布局的屏幕截图替换“match_parent”与“FILL_PARENT”?你能告诉我们与模拟器相比布局究竟有什么问题吗? –
你必须定义“搞砸”,否则......我们不知道“搞砸”是什么意思。 – Jack
你可以发布到底是什么东西,它看起来有多必要? –