如何更换Android版本,android – 如何为Lollipop和Lollipop版本更改工...

开发者在Android应用中遇到一个问题,即无法更改Toolbar菜单项的文字颜色。尽管尝试了多种方法,如设置@color/white#000,但未能成功。问题出现在styles.xml和toolbar.xml的配置中,开发者希望将SKIP菜单项的文字从黑色变为白色,并提供了相关代码片段。寻求解决方案。
摘要由CSDN通过智能技术生成

我在我的应用程序中使用工具栏进行材料设计.一切正常,但除了改变菜单项文字颜色,我完全坚持解决方案.我还发布了应该采取的文本的截图和我在我的应用程序中使用的代码供您参考.我尝试了几种替代方法,例如分配如下

@color/white

#000

但是已知上述解决方案对我有用.

要求截图:

0d67edfb4460185dd1ae78dea6ded4ac.png

需要将SKIP菜单项从黑色更改为白色.

styles.xml

@color/blue

@color/blue

true

false

@style/DrawerArrowStyle

@color/white

#000

toolbar.xml

xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:app="http://schemas.android.com/apk/res-auto"

android:id="@+id/toolbar"

android:layout_width="match_parent"

android:layout_height="?attr/actionBarSize"

app:popupTheme="@style/ThemeOverlay.AppCompat.Light"

app:layout_scrollFlags="scroll|enterAlways"

android:fitsSystemWindows="true"

android:background="?attr/colorPrimary"/>

舱单

android:name=".activity.HomeActivity"

android:label="@string/app_name"

android:screenOrientation="portrait"

android:configChanges="keyboard|screenLayout|orientation"

android:theme="@style/ToolBarTheme">

我真的不知道我犯了什么错误.请帮我.提前致谢

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值