【问题标题】:How to remove top shade on tab content如何删除选项卡内容上的顶部阴影
【发布时间】:2012-02-29 20:53:57
【问题描述】:

我使用以下 XML 代码创建了一个 Android 选项卡活动:

<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>

第一个选项卡在自己的布局文件中呈现 WebView,如下所示:

<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>

结果是呈现如下内容的活动:

我的问题是: 为什么这个阴影出现在标签内容中?我怎样才能删除它? 我已经尝试了一切来删除它,但它一直出现。

我已阅读 thisthis,但没有人提供帮助。

【问题讨论】:

标签: android android-tabs


【解决方案1】:

【讨论】:

  • 请注意,已经通过定义自己的样式禁用了条带。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-05-07
  • 2012-12-31
相关资源
最近更新 更多