Tab Host does not carry through out application in android -
i new android programming.my application consists of 20 screens , bottum tab host 3 tab items.this tab host should carried each , every screen.but in application carried upto 2 activities.then how can carries through out application.
this code wrote
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 tabs tabhost.addtab(tabspecandroid); tabhost.addtab(tabspecapple); tabhost.addtab(tabspecwindows); tabhost.addtab(tabspecberry); in first screen have list of entries.when click on 1 of entry,it goes screen.but in screen tab host not appearing.any thing wrong in code.please give me suggestion.
thanks inadvance
why cant use fragments.
see tutorial
http://wptrafficanalyzer.in/blog/creating-navigation-tabs-using-tabhost-and-fragments-in-android/
Comments
Post a Comment