Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4117574
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:51:06+00:00 2026-05-20T22:51:06+00:00

I am trying to use tabs with a webview but I cant seem to

  • 0

I am trying to use tabs with a webview but I cant seem to get it to work together, i can only get one or the other to display depending on where i put the webview but not both at the same time.

here is my main.xml

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_height="fill_parent" android:layout_width="match_parent">

    <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />
             <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="5dp" />    
    <WebView android:id="@+id/webView1" 
    android:layout_height="fill_parent" 
    android:layout_width="fill_parent"></WebView>    
</LinearLayout>
</TabHost>

that way only displays the tabs, if i move the webview above the tabwidget then only the webview displays. how do i get them both to display?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:51:07+00:00Added an answer on May 20, 2026 at 10:51 pm

    I hat Problems with the TabView too, solved it by using a Tabactivity instead of TabWidget:

    public class main extends TabActivity {
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    
    
        tabHost = getTabHost();
        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator("", getResources().getDrawable(android.R.drawable.ic_menu_preferences))
                .setContent(new Intent(this,tab1.class)));
        tabHost.addTab(tabHost.newTabSpec("tab2")
                .setIndicator("", getResources().getDrawable(android.R.drawable.ic_menu_agenda))
                .setContent(new Intent(this,tab2.class)));
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator("", getResources().getDrawable(android.R.drawable.ic_menu_edit))
                .setContent(new Intent(this,tab3.class)));
    
        tabHost.setOnTabChangedListener(new OnTabChangeListener() {
            @Override
            public void onTabChanged(String tabId) {
                if(tabId.equals("tab1")){
    
                }else if(tabId.equals("tab2")){
    
                }else if(tabId.equals("tab3")){
    
                }
            }   
        });
    }}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to use http://livepipe.net/control/tabs to get some javascript tabs up and running
I am trying to use a closure to ensure that a function can only
I'm trying to use the example found in: example , and I can get
I am trying to use an unordered list to simulate tabs in CSS but
I'm trying to use a webview inside a tabhost that has 4 tabs -
I'm trying to use the JQuery UI tabs by pointing one of the tabs
I'm trying to use the tabs purely as a navigational menu, loading my pages
I'm trying to use jQuery UI tabs much like a Master Page in ASP.Net.
I am trying to make use of jQueryUI AJAX tabs in my ASP.Net Webforms
I am trying use Google Maps for my work; I have downloaded an example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.