I did it by using tabhost, you can use tabhost without tabactivity following is the code.
final TabHost tabHost=(TabHost)findViewById(R.id.tabhost);
tabHost.setup();
final TabSpec spec1 = tabHost.newTabSpec("Tab1");
View view = LayoutInflater.from(this).inflate(R.layout.tabbar8, tabHost.getTabWidget(), false);
spec1.setIndicator(view);
spec1.setContent(R.id.tab1);
where tabbar8 is layout which i want to set on my first tab