整个应用程序中都没有Android提升
我的Android应用程序有一个问题:整个应用程序中的提升都不起作用。我的CardView没有提升,我的工具栏没有这一点提升,你也看不到我的BottomNavigationView的边缘,因为它是白色的,效果不在那里,所以没有线条 你有什么线索,为什么会这样?我已经对此进行了谷歌搜索,但我从未发现任何影响整个应用程序的东西。如果您需要更多信息,请询问,我很乐意提供 一些(可能)重要细节: 我的所有活动和片段都使用“AppTheme.NoActionBar” 谢谢你的建议 my styles.xml:整个应用程序中都没有Android提升,android,android-layout,android-theme,android-styles,android-elevation,Android,Android Layout,Android Theme,Android Styles,Android Elevation,我的Android应用程序有一个问题:整个应用程序中的提升都不起作用。我的CardView没有提升,我的工具栏没有这一点提升,你也看不到我的BottomNavigationView的边缘,因为它是白色的,效果不在那里,所以没有线条 你有什么线索,为什么会这样?我已经对此进行了谷歌搜索,但我从未发现任何影响整个应用程序的东西。如果您需要更多信息,请询问,我很乐意提供 一些(可能)重要细节: 我的所有活动和片段都使用“AppTheme.NoActionBar” 谢谢你的建议 my styles.xm
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat" />
<style name="AppTheme.NoActionBar.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.NoActionBar.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="AppTheme.BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/AppTheme.BottomSheetStyle</item>
</style>
<style name="AppTheme.BottomSheetStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="behavior_hideable">true</item>
<item name="behavior_skipCollapsed">true</item>
</style>
<!--<style name="myDialog" parent="Theme.AppCompat.Light.Dialog">
<item name="android:windowNoTitle">true</item>
</style>-->
<!-- added from new -->
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/splash_background</item>
</style>
<style name="CardView.Round" parent="Base.CardView">
<item name="cardCornerRadius">10dp</item>
<item name="cardElevation">3dp</item>
</style>
<style name="Borderless.Button.Accent" parent = "Borderless.Button">
<item name="android:textColor">@color/colorAccent</item>
</style>
<style name="Borderless.Button" parent="Widget.AppCompat.Button.Borderless">
<item name="android:textStyle">bold</item>
<item name="android:textSize">18sp</item>
</style>
@颜色/原色
@颜色/原色暗
@颜色/颜色重音
假的
真的
@颜色/原色
@颜色/原色暗
@颜色/颜色重音
@style/AppTheme.BottomSheetStyle
真的
真的
@可绘制/飞溅背景
10dp
3dp
@颜色/颜色重音
大胆的
18便士
您需要在AndroidManifest.xml文件上设置android:hardwareAccelerated=“true”属性您是否在安装了安卓5或更高版本的设备上进行测试?@TheLower是的,但我已经找到了解决方案