I have done TabActivity
with this code:
addTab(publication, "First", My_Files.class);
addTab(shop, "Second", Others.class);
private void addTab(String labelId, int drawableId, Class<?> c)
{
TabHost tabHost = getTabHost(); // The activity TabHost
Intent intent = new Intent(this, c);
TabHost.TabSpec spec = tabHost.newTabSpec("tab" + labelId);
View tabIndicator = LayoutInflater.from(this).inflate(R.layout.tab_indicator, getTabWidget(), false);
TextView title = (TextView) tabIndicator.findViewById(R.id.title);
title.setText(labelId);
ImageView icon = (ImageView) tabIndicator.findViewById(R.id.icon);
icon.setImageResource(drawableId);
spec.setIndicator(tabIndicator);
spec.setContent(intent);
tabHost.addTab(spec);
}
In these first and second tabs, I have ListView
s with some context where user press it and it goes to other Activity
with this code:
Intent intent = new Intent("android.app.reader.FILES");
intent.putExtra("publicatonName", "fileName");
startActivity(intent);
But there disappear my TabActivity
, but I still want to use it like iPhone
UITabBar
with UINavigationController
So now I am thinking that when I go to other Activity
I need to change current TabActivity
button class target to current and somehow my Tab Bar Activity
should be visible.
Maybe someone could help me.
Thanks.