我有一个问题。我刚刚从SDK 22更新到23,之前版本的“getColorStateList()”已经被弃用。
我的代码是这样的
seekBar.setProgressTintList(getResources().getColorStateList(R.color.bar_green));
valorslide.setTextColor(getResources().getColorStateList(R.color.text_green));
旧的“getColorStateList”已经过时
getColorStateList(int id)
还有一个新的
getColorStateList(int id, Resources.Theme theme)
我如何使用主题变量?谢谢。
seekBar.setProgressTintList()
上遇到了兼容性问题(已通过Anthony的答案解决)。(我并不真正需要它,只是为了了解) - fkchaudColorStateList
? - Amir Hossein Ghasemi