TabHost with custom design
<p>I want to design a custom TabHost.<br/>
I have currently designed following layout, but I want to change margin/padding of 'TabSpec'(each tab).<br/>
I want one tab overlap on other like this:<br/>
<img src="http://i.stack.imgur.com/081R4.png" alt="current out-put"><br/>
Is it possible with negative margin?</p>

<p>I want this kind or layout:<br/>
<img src="http://i.stack.imgur.com/Jwr67.png" alt="enter image description here"></p>

<pre><code>protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.search_restaurants_menu);

    // /tab//
    tabHost = getTabHost();

    // Tab1
    TabSpec spec_info = tabHost.newTabSpec(getString(R.string.info));
    spec_info.setIndicator(getString(R.string.info), null);
    Intent Intent_info = new Intent(this, RestaurantInfoActivity.class);
    spec_info.setContent(Intent_info);

    // Tab2
    TabSpec spec_menu = tabHost.newTabSpec(getString(R.string.menu));
    // setting Title and Icon for the Tab
    spec_menu.setIndicator(getString(R.string.menu), null);
    Intent Intent_menu = new Intent(this, RestaurantMenuActivity.class);
    spec_menu.setContent(Intent_menu);

    // Tab3
    TabSpec videospec = tabHost.newTabSpec(getString(R.string.reviews));

    videospec.setIndicator(getString(R.string.reviews), null);
    Intent Intent_review = new Intent(this, RestaurantReviewActivity.class);
    videospec.setContent(Intent_review);

    // Adding all TabSpec to TabHost
    tabHost.addTab(spec_info); 
    tabHost.addTab(spec_menu); 
    tabHost.addTab(videospec); 

    tabHost.getTabWidget()
            .getChildTabViewAt(0)
            .setBackgroundDrawable(
                    getResources().getDrawable(R.drawable.tab_selector));
    tabHost.getTabWidget()
            .getChildTabViewAt(1)
            .setBackgroundDrawable(
                    getResources().getDrawable(R.drawable.tab_selector));
    tabHost.getTabWidget()
            .getChildTabViewAt(2)
            .setBackgroundDrawable(
                    getResources().getDrawable(R.drawable.tab_selector));

    int tabCount = tabHost.getTabWidget().getTabCount();

    Display display = getWindowManager().getDefaultDisplay();
    int width = display.getWidth();

    for (int i = 0; i &lt; tabCount; i++) {
        final View view = tabHost.getTabWidget().getChildTabViewAt(i);
        if (view != null) {
            // reduce height of the tab
            // view.getLayoutParams().height *= 0.55;
            // get title text view
            final View textView = view.findViewById(android.R.id.title);
            if (textView instanceof TextView) {
                // just in case check the type

                // center text
                ((TextView) textView).setGravity(Gravity.LEFT
                        | Gravity.CENTER_VERTICAL);
                // wrap text
                ((TextView) textView).setSingleLine(true);

                // explicitly set layout parameters
                textView.getLayoutParams().height = ViewGroup.LayoutParams.MATCH_PARENT;
                textView.getLayoutParams().width = ViewGroup.LayoutParams.WRAP_CONTENT;

                tabHost.getTabWidget()
                        .getChildAt(i)
                        .setLayoutParams(
                                new LinearLayout.LayoutParams(
                                        (width / 4) - 5,
                                        view.getLayoutParams().height *= 0.44));

                ((TextView) textView).setTextColor(getResources().getColor(
                        R.color.InActiveTab));

            }

        }
    }

}
</code></pre>
