Questions tagged [android-tabhost]

Display a sub list of tab labels representing each page in the parent's tab collection.

Displays a list of tab labels representing each page in the parent's tab collection. The container object for this widget is TabHost. When the user selects a tab, this object sends a message to the parent container, TabHost, to tell it to switch the displayed page. You typically won't use many methods directly on this object. The container TabHost is used to add labels, add the callback handler, and manage callbacks.

Reference: Android Developers Tabhost

2122 questions
5
votes
3 answers

Android TabHost - Activities within each tab

I'm trying to create multiple Tabs, each with a different Activity. The only downside is i'm using a custom layout file thus my class extends an Activity rather than a TabActivity. While trying to run, it fails and suggests calling…
Muniu
  • 187
  • 1
  • 2
  • 15
5
votes
1 answer

Problem with TabHost UI layout

What I'm trying to do is create a layout like this: +--------+ Search |EditText| [Button] +--------+ +---------+ |Tab 1 |---------+ | |Tab 2 | |---------+---------+-----------------+ | ListView Item 1 …
Alan B
  • 4,086
  • 24
  • 33
5
votes
1 answer

Strange options menu behavior in Android TabActivity

I have a TabActivity with four tabs (each is its own Activity). Each tab defines its own onCreateOptionsMenu (and in some cases, onPrepareOptionsMenu). When each tab is loaded, an AsyncTask is kicked off to retrieve the data needed to populate that…
5
votes
2 answers

Change Tab Programmatically from Fragment with FragmentPagerAdapter

I'm trying to get my app to change from tab 1 to tab 3. The tabs are in a custom TabsPagerAdapter which extends FragmentPagerAdapter. I've tried to change the tab likes this but it causes NullPointerException. Is the mechanism different with a…
5
votes
1 answer

Why does my custom 'actionBarTabStyle' not override the default style / theme?

I've been trying for days now to override the Holo Theme for a custom Tab Style, but my changes don't have any effect. Here's my styles.xml