我有一个带有DarkActionbar的非常基本的应用程序.
<style name="AppBasetheme" parent="androID:theme.Holo.light.DarkActionbar"> <!-- API 14 theme customizations can go here. --></style>
现在,我正在AndroID Lollipop上对其进行测试. *** 作栏为深色,但d出菜单为浅色.以前的androID版本则不是这种情况.
我试过了,但是效果不理想(深色背景上的深色文字):
<style name="AppBasetheme" parent="androID:theme.Holo.light.DarkActionbar"> <!-- API 21 theme customizations can go here. --> <!-- Will result in dark PopupMenu, but with dark text color (hard to read) --> <item name="androID:popupMenuStyle">@androID:style/Widget.Holo.PopupMenu</item></style>
这是错误吗?如何改变?
解决方法:
最后:
<!-- Base application theme for API 21+. This theme completely replaces AppBasetheme from BOTH res/values/styles.xml and res/values-v21/styles.xml on API 21+ devices.--><style name="AppBasetheme" parent="androID:theme.Holo.light.DarkActionbar"> <!-- API 21 theme customizations can go here. --> <item name="androID:popupMenuStyle">@style/MyPopupMenu</item> <item name="androID:textAppearanceLargePopupMenu">@style/myPopupMenuTextAppearanceLarge</item> <item name="androID:textAppearanceSmallPopupMenu">@style/myPopupMenuTextAppearanceSmall</item></style><style name="myPopupMenuTextAppearanceSmall" parent="@style/TextAppearance.AppCompat.light.Widget.PopupMenu.Small"> <item name="androID:textcolor">#F3F3F3</item></style><style name="myPopupMenuTextAppearanceLarge" parent="@style/TextAppearance.AppCompat.light.Widget.PopupMenu.Large"> <item name="androID:textcolor">#F3F3F3</item></style><!-- style the overflow menu --><style name="MyPopupMenu" parent="androID:style/Widget.Holo.light.ListPopupWindow"> <item name="androID:popupBackground">#303030</item></style>
总结 以上是内存溢出为你收集整理的棒棒糖:DarkActionBar上不需要的灯光菜单全部内容,希望文章能够帮你解决棒棒糖:DarkActionBar上不需要的灯光菜单所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)