如何轻松更改我的应用程序标题文本颜色? [英] How can I painlessly change my app Title text color?

查看:28
本文介绍了如何轻松更改我的应用程序标题文本颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android Studio 用户界面应用程序界面

请参阅随附的 Android Studio UI 图像:我想将标题文本颜色从白色更改为灰色;我尝试过的每个 XML 变体都不起作用;我可以在附加的 activity_scrolling.xml 文件中的哪个位置将标题文本更改为灰色 - 并且有效?

See attached Android Studio UI image: I want to change the Title Text COLOR from white to gray; every XML variation I have tried has not worked; where in the attached activity_scrolling.xml file can I change the Title text to gray - and it work?

如何轻松地将应用程序标题的文本颜色从白色更改为灰色?我正在使用 Android Studio 2.3.3 并倾注了样式、颜色和我的活动 XML 文件的 XML 文件,尝试将标题文本颜色从白色更改为灰色,但没有成功完成如此简单的任务 - 它是不直观如何做到这一点.请帮忙,谢谢.

How do I painlessly change the text color from white to gray for my application Title? I am using Android Studio 2.3.3 and have poured through the XML files for style, color, and my activity XML files making attempts at changing the Title text color from white to gray and have not been successful doing such a simple task - it is not intuitive how to do this. Please help, thanks.

推荐答案

这应该有效.转到您的 styles.xml 文件.

This should work. Go to your styles.xmls file.

<style name="TextAppearance.AppCompat.Widget.ActionBar.Title" parent="@style/TextAppearance.AppCompat">

    <item name="android:textSize">TEXT_SIZE_HERE</item>
    <item name="android:textColor">COLOR_RESOURCE_HERE</item>
    <item name="android:fontFamily">FONT_HERE</item>
</style>

相应地进行编辑.此处的视频教程 [https://www.youtube.com/watch?v=510WE8CmiXI][1]

Edit accordingly. Video tutorial here [https://www.youtube.com/watch?v=510WE8CmiXI][1]

这篇关于如何轻松更改我的应用程序标题文本颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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