2

I have created an Android Tab Activity with the following XML code:

<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:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="5dp"
             />

        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"  />

       </LinearLayout>
</TabHost>

The first tab renders a WebView in its own layout file like this:

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center|top"
android:orientation="vertical"
android:layout_margin="0dp" android:padding="0dp">

<ScrollView
    android:layout_width="match_parent" android:layout_height="match_parent"
    android:layout_margin="0dp" android:padding="0dp">

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

        <WebView android:id="@+id/webview"
            android:layout_height="match_parent" android:layout_width="fill_parent" android:background="#00000000"
            android:layout_margin="0dp" android:padding="0dp"
            />

        <Button android:id="@+id/next" android:layout_width="fill_parent" android:layout_height="fill_parent"
            android:text="@string/hotelPhotosBtn" android:layout_marginLeft="8dp" android:layout_marginRight="8dp"/>
    </LinearLayout>        

</ScrollView>

And the result is the activity to render something like this: enter image description here

My Question is: Why this shade appears inside the tab content ? How can i remove it ? I have tried everything to remove it but it keeps on appearing.

I have read this and this but noone helped.

Community
  • 1
  • 1
antoniom
  • 3,143
  • 1
  • 37
  • 53
  • Sorry, my fault ... [the first post](http://stackoverflow.com/questions/3511596/get-rid-of-the-line-under-tabwidget) was finally the answer ... – antoniom Mar 02 '12 at 13:03

1 Answers1

3
setStripEnabled(false);

Look at this Android Developer web

http://developer.android.com/reference/android/widget/TabWidget.html#setStripEnabled%28boolean%29

Samir Mangroliya
  • 39,918
  • 16
  • 117
  • 134