我一直在尝试使Android版本5.0+半透明手机上的状态栏,但无济于事。它有效,但是它有一个影子。出现在Android状态栏上的阴影
这里是我的styles.xml:
<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" parent="Theme.AppCompat.Light.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" />
这里是我的styles.xml(V21):
<resources>>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
</style>
任何想法,我应该如何解决这个问题?我试着在CoordinatorLayout和AppBarLayout上调用setVerticalFadingEdgeEnable(false),但阴影仍然出现在状态栏上。任何帮助,将不胜感激。
在此先感谢。
我设置windowContentOverlay到@null和工具栏上设置0dp升高。它仍然显示阴影。 –
访问此更多.. http://stackoverflow.com/questions/26575197/no-shadow-by-default-on-toolbar/31026359#31026359 – Harshad