【问题标题】:Lower case Action Buttons in Android (default/not-custom) NotificationAndroid 中的小写操作按钮(默认/非自定义)通知
【发布时间】:2018-11-26 14:09:07
【问题描述】:

有没有办法让 Android 通知上的按钮小写(而不是全部大写),而无需“从头开始”构建自定义通知?

在本例中,“REPLY”和“ARCHIVE”将变为“Reply”和“Archive”: https://i.stack.imgur.com/TW17I.png

编辑

所以我真的不知道我在这里做什么。但我尝试过的一件事是修改各种样式模板(50 多个,基本上我认为可能涉及的每一个),看起来像这样

  <style name="TextAppearance.Compat.Notification" parent="@android:style/TextAppearance.StatusBar.EventContent">
  <item name="android:textAllCaps">false</item>
  </style>

这不起作用。但是,因为我不知道自己在做什么,所以我可能犯了一个错误。对此方法的任何建议也表示赞赏。

【问题讨论】:

  • 找到解决方案了吗?
  • 很遗憾没有,抱歉。

标签: android button notifications lowercase


【解决方案1】:

现在从 Android 11 开始支持小写,只需将所需形式的文本提供给 NotificationCompat.Action(),其余的将由 android 完成。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-22
    • 1970-01-01
    • 1970-01-01
    • 2015-06-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多