android - 如何删除选项卡内容上的顶部阴影

标签 android android-tabs

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

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

结果是渲染如下内容的 Activity : enter image description here

我的问题是: 为什么这个阴影出现在选项卡内容中?我怎样才能删除它? 我已经尝试了一切方法来删除它,但它仍然出现。

我已阅读thisthis但没有人帮忙。

最佳答案

关于android - 如何删除选项卡内容上的顶部阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9496106/

相关文章:

android - 如何在 Google android 应用程序后退按钮上做按钮点击动画?

java - TabListener 在 Android 应用程序中不起作用

java - 无法获取三星双 Android 手机中 sim2 的 Sim 卡详细信息(Sim 序列号)

android - 将自定义对象发送到 intent android

android - 如何在android中的sdcard中创建文件夹

android - 在 Android 的 Fragment 中添加选项卡?

Fragment 内的 Android 选项卡布局未加载选项卡内容

Fragment 中的 Android 选项卡布局

Android:确定ActionBar Tab的高度

java - 无法启动Activity(包含 fragment 间通信)