Error while placing a spinner inside Activity Group
<p>I have an activity group containing 3 activities. When a button is pressed, I enter into this activity group and show the 1st activity. From the 1st activity I can goto 2nd activity and from 2nd activity I can goto 3rd activity.</p>

<p>I have a spinner in this 3rd activity layout. Problem is I am not able to click on that spinner. Error gets displayed showing:</p>

<pre><code>12-31 11:29:41.082: ERROR/AndroidRuntime(474): android.view.WindowManager$BadTokenException: Unable to add window -- token android.app.LocalActivityManager$LocalActivityRecord@43791b18 is not valid; is your activity running?
</code></pre>

<p>How can I solve this issue? Can anyone plz help...</p>

<p>Hi,</p>

<p>Please find the code for spinner attached:</p>

<pre><code>setContentView(R.layout.requestinfo);
Spinner spinner = (Spinner) findViewById(R.id.spinner);
ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(
            PGDealerInfoRequestActivity.this, R.array.request_options, android.R.layout.simple_spinner_item);
    spinner.setAdapter(adapter);
</code></pre>

<p>Inside requestinfo.xml,</p>

<pre><code>&lt;Spinner android:id="@+id/spinner" android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:textColor="@android:color/darker_gray"
            android:textSize="12sp" android:textStyle="bold"
            android:layout_marginLeft="10dp" android:layout_marginTop="8dp" /&gt;
</code></pre>
