- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
最近我从支持库切换到 com.google.android.material:material:1.0.0
但是现在我有一个问题,在这个页面中有一个注释 https://github.com/material-components/material-components-android/blob/master/docs/getting-started.md
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.
以及我正在使用的主题
Theme.MaterialComponents.Light.NoActionBar
完全按照该注释中的说明进行操作,它将 AlertDialog 按钮替换为 MaterialButtons,但问题是默认情况下 MaterialButtons 是彩色背景,现在按钮看起来像这样:
我怎样才能让它们再次无边框和无背景?
PS 我正在使用警报生成器来创建警报对话框:
android.app.AlertDialog.Builder
最佳答案
我知道是什么导致了这个问题。我需要使用不同的 AlertDialog 类:
androidx.appcompat.app.AlertDialog
当我切换到这个时,一切都开始按预期工作。这是我找到解决方案的地方:
https://github.com/material-components/material-components-android/issues/162
关于android - MaterialComponents 主题警报对话框按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52829954/
其他一切都工作正常,但此 Material 组件无法导入到项目中的任何位置。我已经尝试构建项目,重新启动 Xcode。 platform :ios, '10.0' target 'BitcoinTic
我正在尝试使用 MaterialComponents 中的 MDCRaisedButton,将其添加为类似于我所有其他依赖项的 pod 依赖项,但是当我尝试导入它时出现编译错误 Module Mate
我想在我的 Swift 4 中使用 MaterialComponents 为我的 View 添加阴影,但我不明白如何使用阴影电梯。我创建了一个名为 ShadowedView 的类,类似于 docume
最近我从支持库切换到 com.google.android.material:material:1.0.0 但是现在我有一个问题,在这个页面中有一个注释 https://github.com/mate
我正在从 AppCompat 迁移到 MaterialComponents,我想保留一些以 AppCompat 为主题的小部件(如底部导航栏)。但是,当我想将 MaterialComponents 主
This is my situation, as you can see I have a daterangepicker from the MaterialComponents.DatePicker
阅读 MaterialComponents theme alert dialog buttons和 https://medium.com/@lcdsmao/material-design-custom
说明:将我的应用程序更改为Theme.MaterialComponents.NoActionBar后,在我的xml文件中,按钮标签的android:background="@drawable/logi
我是快速发展的新手 我试图在我的应用程序中实现 Material 卡。我已安装 'MaterialComponents' using Cocoapods.我可以import MaterialCompo
当我使用 AppCompat 时,它工作正常,但当我更改为 MaterialComponents 时,它看起来很糟糕。 查看当前图片: 请参阅“W”,它没有正确显示。对于 'H' 也是同样的问题。 注
起初,我的应用使用风格。但我将其更改为 Material Components (为了使用标签的 Material 徽章计数)。所以改变后的样式是这样的: @color/gree
我正在为我们的应用程序使用 Material 组件主题。现在我们想要一种自定义字体,我设法将其应用于下面主题的几乎所有地方,它使用 Material 组件定义的各种 textAppearance...
我有两个主题 Theme.MaterialComponents.Light.DarkActionBar 和 Theme.MaterialComponents。对于第一个主题,我的日期选择器对话框看起来
我正在使用 Theme.MaterialComponent ,但它不影响我的actionBar,为什么? 样式.xml @color/colorPrimary
我正在尝试将 customView 添加到 MDCTabBarItem 使用 mdc_customView 但项目没有采用正确的宽度,结果如下 如果我不设置 mdc_customView value
以下是我的依赖 implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.appcomp
我是 Android 新手,我可能有一个愚蠢/愚蠢的问题。我有一个 Activity ,我想在其中动态创建多个输入字段。输入字段的数量由用户定义。 因为输入是样式化的并且由 2 个元素组成,并且不想每
在我的 build.gradle 中,我包含了 Material 设计库(版本 1.1.0),但在 styles.xml 中, 当我尝试使用 Theme.MaterialComponents.DayN
我在应用程序中隐藏状态和导航栏时遇到一些问题。 假设: 使用库 com.google.android.material:material:1.1.0-alpha10 使用样式 Theme.Materi
我想自定义我的 ActionBar。我的主题如下所示: @style/MyActionBar @drawable/actionBarBackground 在值文件夹中: #FF
我是一名优秀的程序员,十分优秀!