- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是我的 colors.xml,其中 colorPrimaryDark
是橙色的:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#ffbf80</color>
<color name="colorAccent">#FF4081</color>
</resources>
我的 statusBar 仍然是黑色的,即使我已经为我的 colorPrimaryDark
设置了橙色。这是为什么?
这是我的 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>
<item name="android:colorForeground">@color/colorPrimaryDark</item>
</style>
</resources>
list
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.zorgan.app" >
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.NoActionBar" >
<activity android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
</application>
</manifest>
最佳答案
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
深色操作栏是罪魁祸首,请尝试设置无操作栏。 <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
请记住,您将经常制作自定义工具栏。
请按照本教程获取更多指导 http://www.android4devs.com/2014/12/how-to-make-material-design-app.html
也切换这个android:theme="@style/Theme.AppCompat.NoActionBar" >
至 android:theme="@style/AppTheme"
关于android - statusBar 颜色与我的 colorPrimaryDark 颜色不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42950270/
我在应用程序中有两个样式文件,它没有将 colorPrimaryDark 作为状态栏颜色。我正在检查 Nexus 6,但它无法正常工作。是我缺少的东西。 样式.xml
有关信息,我使用的是 Android Studio 2.0 Preview 7,API 23。 有问题的 Activity
These two fields have same affect but statusBarColor has higher precedence in theme false t
是否有一个常量值可以添加到工具栏颜色的十六进制代码中,以获得状态栏颜色? 最佳答案 要真正遵守指南,您应该选择主要颜色和主要深色 among these . colorPrimary 应该是 500
我只想为一项 Activity 更改 ColorPrimaryDark 的颜色。我怎样才能做到这一点? 我想去styles.xml并改变这个: @color/blue 但问题是,如果我这样做,我会更改
(注意:这与 When using ActionMode, the status bar turns black on Lollipop 有点相关,所以可能有一些额外的信息被我不小心从这个问题中遗漏了
这是我的 colors.xml,其中 colorPrimaryDark 是橙色的: #3F51B5 #ffbf80 #FF4081 我的 statusBar 仍然是黑色的
~/myApp/app/build/intermediates/res/merged/debug/values/values.xml:102: error: Error: No resource fo
是否有可能以编程方式覆盖 colorPrimary、colorPrimaryDark 和 colorAccent 值,并在运行时从 java 代码相应地进行更改?如果可能请帮忙。 最佳答案 不,这不可
我在 style.xml 上添加了 colorPrimaryDark,但状态栏 android v21 没有影响颜色。 我有一个自定义工具栏,我在 style.xml 代码中没有使用操作栏主题 如果有
在 Material Design 的指导下,状态栏应该比操作栏暗多少?我在运行时为操作栏设置了颜色,并且在编程时无法知道该颜色,那么如何获得正确的状态栏颜色? 我知道我可以用这个来加深颜色 this
我正在尝试了解主题在 android 中的工作原理。我不知道为什么 colorPrimaryDark 不适合我,或者我做错了。 我尝试了这个设置,我的操作栏因为 colorPrimary 变成了红色:
我正在尝试使用这个:https://stackoverflow.com/a/24633486/4707917 但它对 kitkat 不起作用... 我只需要 colorPrimaryDark 就像 k
我是android开发新手,想换个主题色 @android:color/white @color/colorPrimaryDark @color/colorAccent
我目前正在使用 AIDE 进行 App 开发,并且仍在学习和练习,但不幸的是,每次我在 AppCompat 中输入 colorPrimary、colorPrimaryDark 和 colorAccen
我是一名优秀的程序员,十分优秀!