Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/213.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android xml/linearlayout未在设备上正确显示_Android_Xml_Eclipse - Fatal编程技术网

Android xml/linearlayout未在设备上正确显示

Android xml/linearlayout未在设备上正确显示,android,xml,eclipse,Android,Xml,Eclipse,如果这个问题已经被问过,我很抱歉,但是我找不到任何答案。以下是一些背景内容: 我在Nexus4上测试我的应用程序,以修复一些小错误。然而,就在eclipse启动它的时候,这个区域出现了断电,我的电脑被关掉了。最后,一旦电源恢复,我想在再次运行我的应用程序之前,我会将字体设置为.setTypeFace(),但这使我的应用程序在运行时崩溃。因此,在对代码进行修改并没有找到修复程序后,我决定去掉整个字体,只运行带有bug修复程序的应用程序。然而,这让我的应用看起来像 现在在eclipse上,显示了图形

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

我在Nexus4上测试我的应用程序,以修复一些小错误。然而,就在eclipse启动它的时候,这个区域出现了断电,我的电脑被关掉了。最后,一旦电源恢复,我想在再次运行我的应用程序之前,我会将字体设置为.setTypeFace(),但这使我的应用程序在运行时崩溃。因此,在对代码进行修改并没有找到修复程序后,我决定去掉整个字体,只运行带有bug修复程序的应用程序。然而,这让我的应用看起来像

现在在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>

----一堆文本视图----
----更多文本视图----
----三个按钮----

通常情况下,当我更改字体时,我的应用程序会出现这种情况,一些字体在版面中出现类似的情况,我使用的一些变通方法是在选项卡空间后添加一个字符或一个点,它可以工作,但是再次仔细检查字体问题,尝试重新设置字体或设置另一种字体。

我终于找到了答案-是背景。我肯定是把9.png弄得一团糟,因为一旦我去掉了背景,它就自行修复了。

你试过Eclipse插件用于预览的几种配置文件了吗?是的,就我所能理解的你的问题而言,它们看起来都很好-你的问题是你的标题文本视图被切断了?您可以发布该元素的XML和用于设置/样式/更改它的Java代码吗?我去掉了自定义字体,但没有任何更改。