3

很抱歉,如果这个问题已经被问过,但我找不到任何答案。这是一些背景背景:

我正在我的 Nexus 4 上测试我的应用程序以修复一些小错误。然而,就在 eclipse 启动它的时候,该区域突然断电,我的电脑关机了。最终,一旦电源恢复,我想我会在再次运行我的应用程序之前通过 .setTypeFace() 设置一个字体,但这使我的应用程序在我运行它时崩溃。因此,在摆弄代码并没有找到修复后,我决定摆脱整个字体,只运行带有错误修复的应用程序。但是,这使我的应用看起来像这样

现在在 Eclipse 上,图形布局显示了这个。今天之前我的应用程序显示的图形布局非常好。eclipse上没有出现错误。

为什么会发生这种情况,我该如何解决?我会损坏整个文件吗?谢谢。

编辑: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:background="@drawable/testbg"
    android:orientation="vertical"
    android:weightSum="100" >

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

    ---- bunch of textviews ----

    </RelativeLayout>

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

    ---- 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" >

    ---- three buttons ----

</LinearLayout>

</LinearLayout>
4

2 回答 2

1

我终于弄明白了——那是背景。我一定是在某个地方搞砸了 9.png,因为一旦我摆脱了背景,它就会自行修复。

于 2013-02-26T18:10:38.530 回答
0

通常,当我更改字体时,我的应用程序会发生这种情况,有些字体在布局中会出现这样的情况,我使用的一些游戏是在制表符空间后添加一个字符或一个点,它可以工作,但是再次检查字体问题,尝试重新设置字体或设置其他字体。

于 2013-02-25T13:29:50.093 回答