EditText-Feld nicht angezeigt

Ich versuche, ein einfaches android-Anwendung. Ich ma mit der android-version 2.3.3. Ich habe den folgenden code für die Anzeige eines EditText Feld in meiner xml-Datei:

<?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="#FFFFFF"
    android:orientation="vertical" >

    <LinearLayout
        android:id="@+id/ll1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="@string/username"
            android:textColor="#000000" />

        <EditText
            android:id="@+id/username"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:inputType="text"
            android:text="" >

            <requestFocus />
        </EditText>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll2"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="@string/password"
            android:textColor="#000000" />

        <EditText
            android:id="@+id/password"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textPassword" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll3"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <CheckBox
            android:id="@+id/remember_me"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/remember_me"
            android:textColor="#000000" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll4"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <Button

            android:id="@+id/signInButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/signIn" >
        </Button>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll5"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
        <TextView
            android:id="@+id/forgot_password"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="@string/forgot_password"
            android:textColor="#000000" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll6"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <Button
            android:id="@+id/createAccountButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/create_account" >
        </Button>
    </LinearLayout>

Aber der EditText ist, die nicht angezeigt werden. Alle anderen buttons, textviews und alles wird richtig angezeigt, nur die EditText sind nicht gezeigt. Kann jemand mir bitte sagen, was das problem ist??

-Vielen Dank im Voraus

  • Einfach starten Sie Eclipse einmal. Könnte ein Fehler in Eclipse.
  • Bitte Geben Sie vollständige code der xml-Datei.
  • bitte buchen Sie den gesamten xml-code? ich denke, sobald reinigen Sie das Projekt, dann wird es funktionieren.
  • Gerade versucht, hat nicht funktioniert 🙁
  • überprüfen Sie einfach, ich habe meine gesamte xml-Datei.
InformationsquelleAutor Antrromet | 2012-02-06
Schreibe einen Kommentar