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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:32:39+00:00 2026-05-20T06:32:39+00:00

I have 4 tabs that I load using a TabHost and TabWidget using the

  • 0

I have 4 tabs that I load using a TabHost and TabWidget using the following layout:

<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" 
    android:padding="0dp"
    android:layout_margin="0dp">
    <LinearLayout android:orientation="vertical"
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent"
        android:background="#FFFFFF" 
        android:padding="0dp"
        android:layout_margin="0dp">
        <ImageView android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
            android:src="@drawable/titlebar" />
        <LinearLayout android:orientation="horizontal"
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content"
            android:background="#AAAAAA" 
            android:padding="0dp"
            android:layout_margin="0dp">
            <TabWidget android:id="@android:id/tabs"
                android:tabStripEnabled="true" 
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>
        <FrameLayout android:id="@android:id/tabcontent"
            android:layout_width="fill_parent" 
            android:layout_height="fill_parent"
            android:padding="0dp" 
            android:layout_margin="-5dp" />
    </LinearLayout>
</TabHost> 

This looks great in my emulator and also great on my friends G2, however on my EVO 4G there is weird spacing between each tab. It looks like 5 or so pixels between each of the 4 tabs I load.
Again, in an emulator that has the exact same resolution of the EVO (800×480) it looks fine, no spacing between tabs.
Why does it look different on my EVO?
I’ve tried everything I can think of to get rid of the spacing, and nothing works.

  • 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-20T06:32:39+00:00Added an answer on May 20, 2026 at 6:32 am

    you can set background color for tabwidget. see following function for example.

        public static void setTabColor(TabHost tabhost) { 
            for(int i=0;i<tabhost.getTabWidget().getChildCount();i++){ 
         tabhost.getTabWidget().getChildAt(i).setBackgroundColor(Color.parseColor("#ff383737")); //unselected 
        } 
        tabhost.getCurrentTabView().setBackgroundColor(Color.parseColor("#ffe9e8e8"));
    }}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem I am using jquery U.I tabs that load everything with
I have a set of jQuery UI tabs that each load project.php using ajax.
Problem I have a custom tab control using Chrome-shaped tabs that binds to a
I have a page that is using jQuery tabs. Within one of my tabs
I have some tabs that load ajax content. When I click on the tabs
I have this jQuery ajax navigation tabs plugin that I created using some help
I'm using jquery tabs ( http://docs.jquery.com/UI/API/1.7.2/Tabs ). Jquery version 1.3.2 and Jquery UI version
I am using jquery tabs to load content from a remote file. I have
Hi I'm using JQuery tabs http://jqueryui.com/demos/tabs/ with search results being returned from my server
I have the following jquery code that allows me to use tabs, to tab

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.