Whats up stackoverflow. I am trying to make my android xml layout look as professional as possible, but as of right now it feels very amature(probably because im new at app development), would anybody be able to help get my text box’s width to fill the parent correctly? and if you have any pointers please let me know? THANK YOU!
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.11"
android:background="@drawable/repeat"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:text="Setup New Account"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:paddingTop="20dp"
android:text="Please enter a password below"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TableLayout
android:id="@+id/tableLayout2"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TableRow>
<TextView
android:id="@+id/textView1"
android:layout_width="174dp"
android:layout_height="wrap_content"
android:paddingBottom="20dp"
android:paddingTop="20dp"
android:text="Password"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/editText1"
android:layout_width="237dp"
android:layout_height="wrap_content"
android:inputType="textPassword" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/textView1"
android:layout_width="174dp"
android:layout_height="wrap_content"
android:paddingBottom="20dp"
android:paddingTop="20dp"
android:text="Re-Enter"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/editText1"
android:layout_width="237dp"
android:layout_height="wrap_content"
android:inputType="textPassword" />
</TableRow>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:text="Select a Security Question"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Spinner
android:id="@+id/spinner"
android:layout_width="288dp"
android:layout_height="wrap_content"
android:singleLine="false" />
<TableRow>
<TextView
android:id="@+id/textView1"
android:layout_width="174dp"
android:layout_height="wrap_content"
android:paddingBottom="20dp"
android:paddingTop="20dp"
android:text="Answer"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/editText1"
android:layout_width="20dp"
android:layout_height="wrap_content"
android:inputType="textPassword" />
</TableRow>
<TableLayout
android:id="@+id/tableLayout2"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TableRow>
<TextView
android:id="@+id/textView1"
android:layout_width="174dp"
android:layout_height="wrap_content"
android:paddingBottom="20dp"
android:paddingTop="20dp"
android:text="Re-Enter"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/editText1"
android:layout_width="237dp"
android:layout_height="wrap_content"
android:inputType="textPassword" />
</TableRow>
</TableLayout>
<Button
android:id="@+id/button1"
android:layout_width="125dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Button" />
</TableLayout>
</LinearLayout>
I had trouble because i was using the wrong layout, and that was causing me to have trouble sizing my buttons and widgets to the screen