java - Material Components 主题渲染 TextButton 不正确
问题描述
在按照开始更新我们的 Android 应用程序以继承自的说明进行操作后Theme.MaterialComponents.Light
,纯文本按钮呈现不正确。
在注释中,文档状态:
Note: Using a Material Components theme enables a custom view inflater
which replaces default components with their Material counterparts.
Currently, this only replaces <Button> XML components with
<MaterialButton>.
有没有办法禁用自定义视图充气或解决按钮问题?
解决方案
自定义充气器仅替换没有限定符的名称,因此您可以在需要使用特定视图时使用完整的限定名称。在您的情况下<Button>
,用<android.widget.Button>
xml 替换。
推荐阅读
- wordpress - “您关注的链接已过期。” 激活或停用插件时的消息
- hadoop - hdfs dfs -ls with wildcard on path and file name
- flutter - 为什么json序列化器模型类错误?
- mysql - 获取每个 MySQL 查询的成本
- mysql - 无法使用节点 js 从工作台 Mysql 获取数据
- python - Python“十进制”包给出错误的结果
- mysql - 使用运算符 IN 的 Golang MongoDB 更新查询
- android - Android BLE:是否可以在广告 iBeacon 数据包时同时添加服务数据和制造商数据?
- php - 这个雄辩的方法的查询范围?
- shell - csh 脚本 - 传递变量并从另一个 csh 脚本调用 csh 脚本