【发布时间】:2018-08-21 08:30:17
【问题描述】:
我的标签下面不会显示任何阴影,我的代码有什么问题:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#171717"
android:orientation="vertical">
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?actionBarSize"
android:elevation="10dp"
app:tabBackground="@color/tabBackground"
app:tabGravity="fill"
app:tabIndicatorColor="#425ced"
app:tabIndicatorHeight="4dp"
app:tabMode="fixed"
app:tabSelectedTextColor="#425ced"
app:tabTextColor="#e5e5e5"
>
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="0dp"/>
</LinearLayout>
【问题讨论】:
-
您使用的是哪个版本的支持库? 27.0.0刚刚解决了大部分的提升问题,老版本不支持所有组件的提升
-
[在此处查看您的答案](stackoverflow.com/a/43407492/7707187) 它对我有用
标签: android android-layout android-tablayout