相关疑难解决方法(0)

如何以编程方式从当前主题获取背景颜色

我试过这样的东西,但我卡住了:

TypedValue typedValue = new TypedValue(); 
if (this.parentActivity.getTheme().resolveAttribute(android.R.attr.windowBackground, typedValue, true))
{
  // how to get color?
}
Run Code Online (Sandbox Code Playgroud)

android

31
推荐指数
3
解决办法
2万
查看次数

标签 统计

android ×1