我想更改 View 的 Backgroundtint,这是我找到的唯一方法。但我收到一条消息,它只适用于某些 API。我可以让它以某种方式在最高 API 15 上工作吗?或者实际上是否有更好的方法向用户显示已选择按钮?
最佳答案
ViewCompat.setBackgroundTintList()
将达到 API 4 的目的。
Applies a tint to the background drawable.
This will always take effect when running on API v21 or newer. When running on platforms previous to API v21, it will only take effect if view implement the TintableBackgroundView interface.
关于java - API 21 之前的 View.setBackgroundTintList?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43316592/