goodm
goodm

Reputation: 7295

Tabhost, how to get to constructor ? (ANDROID)

Whan I have got a tabhost and impolement the tabs. How I can get to tab constructor to pass some variables?

    TabSpec architectureSpec = tabHost.newTabSpec("architecture");
    architectureSpec.setIndicator(architecture);
    Intent architectureIntent = new Intent(this, ArchitectureTab.class);
    architectureSpec.setContent(architectureIntent);

And I would like get to ArchitectureTab before or right after "onCreate" method.

Upvotes: 0

Views: 171

Answers (1)

Mohamed_AbdAllah
Mohamed_AbdAllah

Reputation: 5322

You can pass variables to the ArchitectureTab class via Intent.putExtra() and read them from this activity via getIntent().getExtra()

Upvotes: 1

Related Questions