Change Activity's theme programmatically
<p>In particular cases I need to remove dialog theme from my activity but it doesn't seem to be working. Here's an example</p>

<p>First activity:</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    startActivity(new Intent(MainActivity.this, SecondActivity.class));
}
</code></pre>

<p>Second activity:</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setTheme(android.R.style.Theme);
    setContentView(R.layout.activity_second);
}
</code></pre>

<p>Manifest excerpt:</p>

<pre><code> &lt;activity android:name="SecondActivity" android:theme="@android:style/Theme.Dialog"&gt;&lt;/activity&gt;
</code></pre>

<p>When I run it's still dialog themed.</p>

<p>API10</p>

<p>Thanks.</p>
