2013-04-19 2 views
0

Я новичок в программировании на Android. Мое приложение состоит из почти 20 экранов и с узлом «tabum tab» с тремя вкладками. Этот хост Tab должен переноситься на каждый экран. Но в моем приложении оно переносится на два вида деятельности. Тогда как я могу выполнить приложение.Вкладка «Хост» не переносит приложение в android

Это код, что я написал

Resources ressources = getResources(); 
TabHost tabHost = getTabHost(); 
// Android tab 
Intent intentAndroid = new Intent().setClass(this, AndroidActivity.class); 
TabSpec tabSpecAndroid = tabHost.newTabSpec("Android").setIndicator("", ressources.getDrawable(R.drawable.icon_android_config)); 
     tabSpecAndroid.setContent(intentAndroid); 
// Apple tab 
Intent intentApple = new Intent().setClass(this, AppleActivity.class); 
TabSpec tabSpecApple = tabHost 
.newTabSpec("Apple") 
.setIndicator("", ressources.getDrawable(R.drawable.icon_apple_config)) 
.setContent(intentApple); 
// Windows tab 
Intent intentWindows = new Intent().setClass(this, WindowsActivity.class); 
TabSpec tabSpecWindows = tabHost 
.newTabSpec("Windows") 
.setIndicator("", ressources.getDrawable(R.drawable.icon_windows_config)) 
.setContent(intentWindows); 
// Blackberry tab 
Intent intentBerry = new Intent().setClass(this, BlackBerryActivity.class); 
TabSpec tabSpecBerry = tabHost 
.newTabSpec("Berry") 
.setIndicator("", ressources.getDrawable(R.drawable.icon_blackberry_config)) 
.setContent(intentBerry); 
// add all tabs 
tabHost.addTab(tabSpecAndroid); 
tabHost.addTab(tabSpecApple); 
tabHost.addTab(tabSpecWindows); 
tabHost.addTab(tabSpecBerry); 

В первом экране есть список entries.When я нажимаю на одном из записи, он переходит к другому screen.but В том, что еще одна закладке экрана хоста не появляется. Любая вещь неправильная в моем коде. Пожалуйста, дайте мне предложение.

Thanks inadvance

+0

что вы имеете в виду осуществить? – stinepike

+0

Объясните, что бит больше предоставляет некоторый код или способ навигации, а также реализацию табуста. – Triode

ответ

Смежные вопросы