I am trying to make a simple android application. I ma using the android version 2.3.3. I have used the following code for displaying a EditText box in my xml file:
<?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>
But the EditText is not being displayed. All other buttons, textviews and everything are being displayed properly, only the EditText are not being shown. Can anyone please tell me what the problem is??
-Thanks in advance
please use this