Call same activity in every tab setContent()
<p>I have a tab activity that every of its tabs is calling the same activity lets say <code>MyTabInterface</code>. So I want my <code>MyTabInterface</code> can take the information of which tab is pressed.I have tried to do this with the code below but didnt seem to work</p>

<pre><code>intent = new Intent().setClass(this,MyTabInterface.class);
intent.putExtra("interface",tabs.elementAt(0).getAction());
intent.putExtra("data",tabs.elementAt(0).getData());
spec = tabHost.newTabSpec(tabs.elementAt(0).getName()).setIndicator(tabs.elementAt(0).getLabel().toString(),res.getDrawable(R.drawable.ic_tab_artists)).setContent(intent);
tabHost.addTab(spec);


intent = new Intent().setClass(this,MyTabInterface.class);
intent.putExtra("interface","table");
intent.putExtra("data","table_data");
spec= tabHost.newTabSpec(tabs.elementAt(1).getName()).setIndicator(tabs.elementAt(1).getLabel().toString(),res.getDrawable(R.drawable.ic_tab_artists))
.setContent(intent);
tabHost.addTab(spec);
</code></pre>

<p>My View will change according to the putExtra details. Here call same activity class in both tab. Fist tab show correctly. But second one show the same as first one.</p>

<p>How can I solve this problem
?</p>
