212mistie592dimpfl885
New Member
I'm setting up a basic data entry form on my app but I'm having difficulty with the layout.
That's the result of the graphical layout. It looks fine but all of the items are stretching well over the boundaries of the phone graphical layout. As a result the text from the button is gone and the spinners look stretched and unprofessional. Here is the XML code:\[code\]<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="fill_parent"android:layout_height="fill_parent"androidadding="5dp"android:background="#F3F3F3"android:stretchColumns="1" ><TableRow> <TextView android:text="@string/name" android:id="@+id/TextView03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#333"> </TextView> <EditText style="@style/CustomText" android:text="" android:id="@+id/nameContent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="@string/nameHint" android:layout_marginBottom="10dp"> </EditText> <!-- CUSTOM STYLES TO BE IMPLEMENTED FRIDAY! --></TableRow><TableRow> <TextView android:text="@string/type" android:id="@+id/TextView05" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#333"> </TextView> <Spinner android:id="@+id/type_spinner" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:layout_marginLeft="-5dp" android:background="@android:drawable/btn_dropdown" androidadding="5dp" /></TableRow><TableRow> <TextView android:text="@string/description" android:id="@+id/TextView04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#333"> </TextView> <EditText android:text="" android:id="@+id/descriptionContent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:inputType="textMultiLine" android:background="#FFF" android:textSize="12dp" android:layout_marginBottom="10dp" androidadding="5dp" android:lines="5" android:hint="@string/descriptionHint"> </EditText></TableRow><TableRow> <TextView android:text="@string/project" android:id="@+id/TextView06" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#333"> </TextView> <Spinner android:id="@+id/type_project" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:drawable/btn_dropdown" android:layout_marginLeft="-5dp" android:layout_marginBottom="10dp" androidadding="5dp"/></TableRow><TableRow><Button android:id="@+id/btnClear" android:layout_width="match_parent" android:layout_height="30dp" android:layout_marginBottom="10dp" android:background="#ADD6AD" android:text="@string/reset" android:drawableLeft="@drawable/ic_discard" android:textColor="#333" android:textSize="12dp" /> <Button android:id="@+id/btnSync" android:layout_width="match_parent" android:layout_height="30dp" android:layout_marginBottom="10dp" android:layout_marginLeft="10dp" android:background="#ADD6AD" android:drawableLeft="@drawable/ic_save" android:text="@string/sync" android:textColor="#333" /> </TableRow> </TableLayout>`\[/code\]Anyone got any idea how to remedy this error? I want everything to stay within the boundaries of the phone preview.