android - TextInputEditText 没有“setStartIconDrawable”功能,为什么?
问题描述
我正在玩TextInputEditText
and TextInputLayout
,尝试功能和材料设计。
我有
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
在毕业典礼上,
在代码中:
//Cannot resolve method 'setStartIconDrawable(int)
textInputLayout.setStartIconDrawable(R.drawable.ic_close);
事实上,“我的”TextInputLayout 还缺少很多其他功能。
这到底是什么?
我已经检查过材料库中没有更新版本,只有 alpha 版本。
解决方案
和 implementation 'com.google.android.material:material:1.1.0-alpha06'
这是工作。
奇怪的是,您被迫使用 alpha 版本来使用指南中的功能......
推荐阅读
- python - 优化问题中蛮力数的算法
- python - scapy嗅探的udp数据包发送到另一台主机后无法接收
- java - 如何在 cassandra 的实体化视图表中使用 less <= 和 >=
- python - python中的django错误没有这样的文件或目录
- javascript - Node.js错误Visual Studio代码中未找到模块错误
- android - 反应原生地图:如何通过用户界面向地图添加带有属性和标记的点
- javascript - Invariant Violation:试图注册两个同名的视图RNCAndroidDropdownPicker
- python - BeautifulSoup 元素解析器
- wpf - 从 Datagrid 组合框单元格中获取所选项目
- microsoft-graph-api - Microsoft Graph - 使用 delta 跟踪驱动器更改不返回共享文件的人