每当我添加导航活动时,我都会在下面看到此问题的截图。有关更多详细信息,我使用的是编译SDK版本27.我在添加导航活动后生成的布局文件中遇到此问题。
我的主题是AppTheme.NoActionBar
我的styles.xml文件内容如下:
<!-- 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>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
该怎么办?我几乎坚持这个。
我认为使用(Base.Theme)您的问题解决方式如下:parent =“Base.Theme.AppCompat.Light.DarkActionBar”>