Declaring Intent Filter in android
<p>I have problem in declaring the intents on my app. I have a form with text fields and spinner. I have added a button which onClick must display Datepicker. I have declared the DatePicker as a new class and added to intent onCLick. </p>

<pre><code>date.setOnClickListener(new View.OnClickListener() {
    public void onClick(View view) 
    {
        Intent i=new Intent(SendMail.this,DatePicker.class);

        startActivity(i);

    }
});
</code></pre>

<p>In manifest i have declared</p>

<pre><code>&lt;activity android:name=".DatePicker"&gt;

        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
</code></pre>

<p>Now the problem is when i click the button the whole form is getting reset and all the spinner values are getting vanished. This must be because of declaring the intent wrongly. So, can anyone specify how to declare my intent so that the DatePicker will be called on the main form iteself</p>
