带有白色工具栏和深色文字的应用 [英] App with white toolbar and dark text

查看:61
本文介绍了带有白色工具栏和深色文字的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用 minSDK 16 的项目来实现这一目标:

I have been trying to achieve this in a project with minSDK 16 :

带有黑色文字和图标的白色操作栏和状态栏.

Actionbar and statusbar in White color with dark text and icons.

赞:

我很久以来一直试图弄清楚这一点. Google搜索会导致很多答案,这些答案毫无意义和/或不支持较旧的api. colorControlNormaltitleTextColor,Appcompat-this,Appcompat -...这是一场噩梦!

I have been trying to figure this out for ages now. Google searches lead to a lot of answers that dont make any sense and/or dont support older api's. colorControlNormal, titleTextColor, Appcompat-this, Appcompat-that... its a nightmare!

我也找不到任何有关将哪些内容放入样式xml的文档,而且我尝试过的所有样式属性组合似乎都没有任何作用.

I am also not able to find any docs on what items to put in my styles xml, and none of the combinations of style properties I tried seem to have any effect whatsoever.

那么有人可以给我一个正确且经过充分解释的演练,以了解如何达到这种效果吗?

So can someone please give me a proper and well explained walkthrough as to how I can acheive this effect?

谢谢.

推荐答案

您可以尝试

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:statusBarColor">@color/white</item>
    <item name="android:windowLightStatusBar">true</item>
</style>

但API最小值为23.

but API min is 23.

此外,到目前为止,别忘了对不同版本的API使用不同的样式,但我还没有找到一款能够按需运行的应用程序,因此很可能是不可能的.

Also, don't forget to use different styles for different versions of APIs so far I haven't found an app that works as you want, so most probably isn't possible.

这篇关于带有白色工具栏和深色文字的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆