首页 \ 问答 \ 如何检测WP7原生分辨率?(How to detect WP7 native resolution?)

如何检测WP7原生分辨率?(How to detect WP7 native resolution?)

我意识到目前只有一种解决方案,但这很好知道。 我也想知道如何将方向设置为肖像。 我设法通过设置后备缓冲区大小来实现,但这似乎不对。


I realize there's only one resolution currently, but this would be nice to know. I'd also like to know how to set the orientation to portrait. I've managed to do it by setting the backbuffer size, but this doesn't seem right.


原文:https://stackoverflow.com/questions/6913019
更新时间:2023-10-17 06:10

最满意答案

尝试这个

toolbar.setTitleTextColor(Color.WHITE);

After @Raghunandan: Just add this string to you AppBaseTheme in styles.xml:

<item name="android:textColorPrimary">@android:color/white</item>

相关问答

更多
  • 你的主要主题的android:actionBarWidgetTheme应该指向一个其中包含android:textColorHint的样式。 这将允许更改搜索视图的提示文本颜色。 android:actionBarWidgetTheme of your main theme should point to a style that has a android:textColorHint in it. That one will allow changing the hint text color of th ...
  • 如果您只希望文本为白色,那么这是Theme.AppCompat的默认值,或者,如果您想要轻量级活动,请使用Theme.AppCompat.Light.DarkActionBar If you just want the text to be white, that is the default for Theme.AppCompat or, if you want a light activity, use Theme.AppCompat.Light.DarkActionBar
  • 尝试这个 toolbar.setTitleTextColor(Color.WHITE); After @Raghunandan: Just add this string to you AppBaseTheme in styles.xml: @android:color/white
  • 正如我认为这是一个简单的属性称为android:actionMenuTextColor 。 要正确使用它,您应该创建自己的样式,如下所示: