android - 海拔没有阴影
问题描述
我的标签下面不会显示任何阴影,我的代码有什么问题:
<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>
解决方案
你不应该使用
android:elevation="10dp"
用这个
app:elevation="10dp"
并将您的支持库升级到最新版本以获得更好的性能。祝你好运
推荐阅读
- macos - 在 MacOS 上构建 D 项目时出错(找不到对象._d_arraysetlengthTImpl)
- python - 在文本文件的行尾写入字符串
- python - 如何更改响应结构
- qt - 更改分辨率时,Qml 应用程序不合适
- javascript - 求给定整数中所有偶数的总和
- flutter - SetState 不更新文本小部件中的变量
- docker - Docker 无法验证 [docker host] 的证书,因为它不包含任何 IP SAN
- r - 标题和副标题之间的ggplot2行
- javascript - 我如何将此 js 函数应用于输入标签?
- flutter - 如何使用颤振检索 Firestore 中的特定文档