I have created a login page for an App I am creating. I am in the process now of making the UI look decent. In my login page (and other pages where I need to input data) if the phone is vertical the EditText boxes won’t snap to the screen to view what is being typed. Whereas if the phone is Horizontal it does?
Do any of you have any idea why this may be happening?
Here is the XML code if it helps:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@color/background"
android:padding="30dip">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_gravity="center">
<TableLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:gravity="center"
android:stretchColumns="*">
<EditText android:id="@+id/username" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:background="@android:drawable/editbox_background" />
<EditText android:id="@+id/password" android:layout_width="fill_parent"
android:password="true" android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background"
android:inputType="text" />
<TableRow>
<Button android:id="@+id/submit_button" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="@string/login_label" />
<Button android:id="@+id/back_button" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="@string/back_label" />
</TableRow>
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_marginBottom="25dip"
android:gravity="center" android:id="@+id/txtServerStatus" />
</TableLayout>
</LinearLayout>
</LinearLayout>
use