Hi,
I wanted to know how to change the location of an EditText input box. I have some Text to be shown on top, then I want the EditText box to be underneath the text, and in the bottom center of the screen. I've tried using gravity, layout gravity, width, height, margins, and I just can't get it to work. I've also tried changing this to a LinearLayout, which totally got rid of the edittext.
Here is the xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000033">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="\nHello!"
android:gravity="center_vertical"
android:typeface="serif"
android:textSize="15sp"
android:textColor="#993300"
android:textStyle="bold"
/>
<EditText
android:text=""
android:id="@+id/EditText01"
android:layout_height="60px"
android:layout_width="40px"
android:inputType="number"
android:singleLine="True"
android:layout_gravity="bottom"
/>
</RelativeLayout>
I wanted to know how to change the location of an EditText input box. I have some Text to be shown on top, then I want the EditText box to be underneath the text, and in the bottom center of the screen. I've tried using gravity, layout gravity, width, height, margins, and I just can't get it to work. I've also tried changing this to a LinearLayout, which totally got rid of the edittext.
Here is the xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000033">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="\nHello!"
android:gravity="center_vertical"
android:typeface="serif"
android:textSize="15sp"
android:textColor="#993300"
android:textStyle="bold"
/>
<EditText
android:text=""
android:id="@+id/EditText01"
android:layout_height="60px"
android:layout_width="40px"
android:inputType="number"
android:singleLine="True"
android:layout_gravity="bottom"
/>
</RelativeLayout>