Changing view inside TabHost (one activity, multiple views)?

You can use intent to set Activity as your tab content, and this activity can call other activities, either listView or any other tid1 is firstTabSpec Id. Its used to access outside. */ TabSpec MainTab = tabHost.

NewTabSpec("tag1"); TabSpec SearchTab = tabHost. NewTabSpec("tag2"); TabSpec MessageTab = tabHost. NewTabSpec("tag3"); TabSpec ServicesTab = tabHost.

NewTabSpec("tag4"); TabSpec SettingsTab = tabHost. NewTabSpec("tag5"); MainTab. SetIndicator("Main", res.

GetDrawable(R.drawable. Anchor_36)); MainTab. SetContent(new Intent(this, MainView.

Class)); SearchTab. SetIndicator("Search", res. GetDrawable(R.drawable.

Clock_36)); SearchTab. SetContent(new Intent(this, SearchView. Class)); MessageTab.

SetIndicator("Messages", res . GetDrawable(R.drawable. Dialog_36)); MessageTab.

SetContent(new Intent(this, MessagesView. Class)); ServicesTab. SetIndicator("Services", res .

GetDrawable(R.drawable. Cloud_36)); ServicesTab. SetContent(new Intent(this, ServicesView.

Class)); SettingsTab. SetIndicator("Settings", res . GetDrawable(R.drawable.

Settings_36)); SettingsTab. SetContent(new Intent(this, SettingsView. Class)); /** Add tabSpec to the TabHost to display.

*/ tabHost. AddTab(MainTab); tabHost. AddTab(SearchTab); tabHost.

AddTab(MessageTab); tabHost. AddTab(ServicesTab); tabHost. AddTab(SettingsTab) Now in the loaded activity you can use the code like StartActivity(new intent(currentActivity.

This, newActivity. Class)) this will work for you.

You can use intent to set Activity as your tab content, and this activity can call other activities, either listView or any other. /** tid1 is firstTabSpec Id. Its used to access outside.

*/ TabSpec MainTab = tabHost. NewTabSpec("tag1"); TabSpec SearchTab = tabHost. NewTabSpec("tag2"); TabSpec MessageTab = tabHost.

NewTabSpec("tag3"); TabSpec ServicesTab = tabHost. NewTabSpec("tag4"); TabSpec SettingsTab = tabHost. NewTabSpec("tag5"); MainTab.

SetIndicator("Main", res. GetDrawable(R.drawable. Anchor_36)); MainTab.

SetContent(new Intent(this, MainView. Class)); SearchTab. SetIndicator("Search", res.

GetDrawable(R.drawable. Clock_36)); SearchTab. SetContent(new Intent(this, SearchView.

Class)); MessageTab. SetIndicator("Messages", res . GetDrawable(R.drawable.

Dialog_36)); MessageTab. SetContent(new Intent(this, MessagesView. Class)); ServicesTab.

SetIndicator("Services", res . GetDrawable(R.drawable. Cloud_36)); ServicesTab.

SetContent(new Intent(this, ServicesView. Class)); SettingsTab. SetIndicator("Settings", res .

GetDrawable(R.drawable. Settings_36)); SettingsTab. SetContent(new Intent(this, SettingsView.

Class)); /** Add tabSpec to the TabHost to display. */ tabHost. AddTab(MainTab); tabHost.

AddTab(SearchTab); tabHost. AddTab(MessageTab); tabHost. AddTab(ServicesTab); tabHost.

AddTab(SettingsTab); Now in the loaded activity you can use the code like StartActivity(new intent(currentActivity. This, newActivity. Class)); this will work for you.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions