Question

I’m taking the HelloTabWidget Android example and trying two things:

  • Moving the tabs to the bottom vs. the top (if that’s even desirable from an Android UI POV)
  • Making each tab show a particular WebView in the space above

I’ve got this for a layout (high level):

<TabHost>
  <LinearLayout>
    <FrameLayout>
      <WebView/>
      <WebView/>
      <WebView/>
      <WebView/>
      <WebView/>
    </FrameLayout>
    <TabWidget/>
  </LinearLayout>
</TabHost>

Everything has a width/height set to fill_parent except for the TabWidget which has its layout_height set to wrap_content (and the layout_gravity set to bottom).

First thing I noticed is that WebViews don’t show anything until all the parents have width/height set to fill_parent. However, once I do that, they fill the entire display, obscuring the TabWidget.

Is there some other trick to making these two views play nicely together?

Was it helpful?

Solution

AFAIK, tabs will not work at the bottom.

TabHost and WebView work fine together, though I do not have a current sample that demonstrates this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top