简体   繁体   English

不要在Android应用程序中更改布局

[英]Don't changes layout in android application

I changed in eclipse background of layout and added new view (button). 我更改了Eclipse的布局背景并添加了新视图(按钮)。

I started my application but in emulator nothing changed! 我启动了我的应用程序,但是在模拟器中什么都没有改变!

What can I make? 我能做什么? Mayby it's an Eclipse bug? 也许这是一个Eclipse错误?

I downloaded this project from internet. 我从互联网下载了这个项目。 Initially it had black background. 最初它具有黑色背景。 I added new View - all was OK. 我添加了新的视图-一切正常。 But after I started changed background - and appeared this bugs 但是当我开始改变背景之后,出现了这个错误

XML: XML:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@android:color/white"
    android:orientation="vertical" >

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button" />

    <EditText
        android:id="@+id/txtInd"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10" >

        <requestFocus />
    </EditText>

 <ListView 
    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    </ListView>

</LinearLayout>

Whenever you want to test the app again, DO NOT click on your app's icon in the emulator. 每当您要再次测试应用程序时,请勿在模拟器中单击您的应用程序图标。 However, select your project, and click on 但是,选择您的项目,然后单击 在此处输入图片说明

IF this doesn't work. 如果这不起作用。 Try cleaning your project from : Project >>> Clean 尝试从以下位置清理项目: Project >>> Clean

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM