1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| public class Tabhost extends TabHost {
TabHost tabhost;
public Tabhost(Context context) {
super(context);
// TODO Auto-generated constructor stub
tabhost = (TabHost) findViewById(R.id.tabhost);
Intent questionIntent = new Intent(context, Question.class);
Intent blocnoteIntent = new Intent(context, Blocnote.class);
tabhost.addTab(tabhost.newTabSpec("tab_question").setIndicator("questions",getResources().getDrawable(android.R.drawable.ic_menu_edit)).setContent(questionIntent));
tabhost.addTab(tabhost.newTabSpec("tab_blocnote").setIndicator("bloc note",getResources().getDrawable(android.R.drawable.ic_menu_edit)).setContent(blocnoteIntent));
tabhost.setup();
} |
Partager