【发布时间】:2017-04-24 16:52:06
【问题描述】:
您好,我希望我的片段中的标签主机有阴影。我的 XML 代码是
<?xml version="1.0" encoding="utf-8"?>
<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_marginTop="60dip"
>
<android.support.v4.app.FragmentTabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0" />
</android.support.v4.app.FragmentTabHost>
<FrameLayout
android:id="@+id/realtabcontent"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1" />
</LinearLayout>
我尝试了 stackoverflow 上所有可用的解决方案,但它不起作用。请帮忙。
【问题讨论】:
-
你试过在 FragmentTabHost 的背景下的 Layer-list shadow 吗?
-
不。如何做到这一点?
-
你试过
android:elevation=""这个属性吗?
标签: android xml fragment android-tabhost shadow