Android Emulator Force closes when loading Custom Layout
<p>i created a custom layout where i have a couple  of LinearLayout in a ScrollView. Problem is when i set my SetContentView to my custom Layout (when the application starts), the emulator gives an error and force closes! i don't know why. i have tried with another custom layout or set it to main and it seems to work fine.</p>

<p>any ideas what could be wrong?</p>

<hr>

<p>yes i meant to say the app is crashing. here is the xml code for the custom layout: (too many spinners!)</p>

<p>



<p>android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical"
  android:padding="10dp"></p>

<pre><code>&lt;TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/Name"
    android:id="@+id/name"
    android:textSize="18sp"
    android:gravity="center"&gt;
&lt;/TextView&gt;

&lt;LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:padding="10dp"
    &gt;


    &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/Picker"
        android:text="@string/drinkText"
        android:textColor="#303030"&gt;
    &lt;/TextView&gt;

    &lt;View
        android:layout_height="5dp"/&gt;

    &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/TimePicker"
        android:text="@string/TimeText"
        android:textColor="#303030"&gt;
    &lt;/TextView&gt;


    &lt;View 
        android:layout_height="20dp"/&gt;


    &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@id/EndPicker"
        android:text="@string/EndText"
        android:textColor="#303030"&gt;
    &lt;/TextView&gt;

    &lt;View
        android:layout_height="5dp"/&gt;

    &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@id/sortPicker"
        android:text="@string/sortText"
        android:textColor="#303030"&gt;
    &lt;/TextView&gt;

&lt;/LinearLayout&gt;



&lt;LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:padding="10dp"
    android:orientation="horizontal"&gt;

    &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Categories:"
        android:id="@+id/CategorySelect"/&gt;

    &lt;Spinner
        android:id="@+id/categorySpinner"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:drawSelectorOnTop="true"
        android:prompt="@string/categoriesPrompt"
        android:visibility="visible"/&gt;

&lt;/LinearLayout&gt;

&lt;LinearLayout 
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:padding="10dp"&gt;

    &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Priority:"
        android:id="@+id/prioritySelect"/&gt;

    &lt;Spinner
        android:id="@+id/prioritySpinner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:drawSelectorOnTop="true"
        android:prompt="@string/priorityPrompt"
        android:visibility="visible" android:layout_weight="0.0"/&gt;

    &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="State:"
        android:id="@+id/stateSelect"/&gt;


    &lt;Spinner
        android:id="@+id/statusSpinner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:drawSelectorOnTop="true"
        android:prompt="@string/statusPrompt"
        android:visibility="visible"/&gt;

&lt;/LinearLayout&gt;

&lt;LinearLayout
    android:orientation="horizontal"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="10dp"&gt;

&lt;TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Reminder:"
    android:id="@+id/Reminder"/&gt;

 &lt;Spinner
        android:id="@+id/remindSpinner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:drawSelectorOnTop="true"
        android:prompt="@string/remindPrompt"
        android:visibility="visible"/&gt;

&lt;/LinearLayout&gt;

&lt;LinearLayout 
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="10dp"
    android:background="#FF303030"&gt;

    &lt;TextView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:text="suggestions:"
        android:typeface="sans"&gt;
    &lt;/TextView&gt;


&lt;/LinearLayout&gt;
</code></pre>

<p></p>
