1

在我的 Nexus 4 上,我的应用看起来像这样。该应用程序在 Eclipse WYSIWYG 屏幕上看起来非常正常。这个xml文件是:(因为原件很长,我已经删除了所有的文本视图和按钮,因为我认为这与问题无关)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="100"
android:background="@drawable/testbg">

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="33"
    android:orientation="vertical" >

    ---- bunch of textviews ---

</RelativeLayout>

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="57"
    android:orientation="vertical" >

    ---- more TextViews ----

</RelativeLayout>

<LinearLayout
    android:id="@+id/linearLayout1"
    android:layout_width="fill_parent"
    android:layout_height="0dp"
    android:layout_weight="10"
    android:orientation="horizontal"
    android:weightSum="3" >

    ---- 3 buttons ----       

    </LinearLayout>

</LinearLayout>

为什么会这样?xml只是损坏了吗?

4

0 回答 0