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 8760223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:59:27+00:00 2026-06-13T14:59:27+00:00

My application has android:targetSdkVersion set to 11. It uses TabHost and TabWidget with two

  • 0

My application has android:targetSdkVersion set to 11. It uses TabHost and TabWidget with two tabs. However, the android:minSdkVersion is set to 7 (Android 2.1).

I use the Android Support Library (android-support-v13.jar). My tabs look fine everywhere I’ve been able to test, except in 2.1 where they appear to be clipping parts of the view that forms the tab’s content. This problem in reproducible in the emulator as well.

Here’s the relevant section of the layout file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/repeat_layout"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <TabHost
        android:id="@android:id/tabhost"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" >

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android: />

        <FrameLayout>
        ...
        </FrameLayout>
    </TabHost>
</LinearLayout>

Here’s how I expect the tabs to look:

Expected

Here’s what I get in 2.3 devices:

Unexpected

Basically, it seems the Tabs are taller than they need to be and also unnecessarily overlapping with the contents of the FrameLayout below.

SOLUTION:
Mostly for future visitors, if you’re looking to have you tabs appear consistent on all platforms down to 2.1, the only solution is to use custom Tab views. You’ll find an excellent tutorial here.

  • 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-06-13T14:59:28+00:00Added an answer on June 13, 2026 at 2:59 pm

    Try This

    <?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  android:layout_width="fill_parent" android:layout_height="fill_parent"
            android:orientation="vertical" >
    
            <TabWidget android:layout_width="fill_parent" android:layout_height="wrap_content"
                android:layout_weight="0" android:id="@android:id/tabs"
                android:orientation="horizontal" />
    
            <FrameLayout android:layout_width="fill_parent" android:layout_height="0dp"
                android:layout_weight="1" android:id="@+android:id/realtabcontent" />
    
        </LinearLayout>
    </TabHost>
    

    Hope it helps…!! Cheers…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application has android:minSdkVersion = 10 android:targetSdkVersion = 14 When I run it with
My application has android:configChanges=keyboardHidden|orientation set in the manifest file. When I rotate my device,
I am using viewflipper in an android applicatiion. My application has tabhost within tabhost.
An Android application has two activities. Activity A shows a list of items. Activity
My android application has several warnings of the following form when I run it
My Android Application has only one activity called MainActivity . When I press the
In order for the user to control the volume , my android application has
I am developing the android application in which The application has a stored password
I want to implement PDF viewer in my Android application. My application has option
I have an Android app, that is using the SIM Toolkit. The application has

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.