android - 远程 View 框架布局背景颜色

标签 android colors android-framelayout remoteview

int mColor = 0xff00ff00;

remoteView.setInt(R.id.framelayout1, "setBackgroundResource", android.R.color.white);

如何使用 mColor 设置颜色?

最佳答案

你应该试试

remoteView.setInt(R.id.framelayout1, "setBackgroundColor", mColor);

关于android - 远程 View 框架布局背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7496983/

相关文章:

android - 你如何让 Idling 资源在 Kotlin 中与协程一起工作

css - 为什么颜色在 CSS 中用十六进制值表示?有历史解释吗?

python - 图像螺旋像素搜索

android - 在 logcat 上看不到 StrictMode 详细信息 - 在屏幕旋转时抑制了 StrictMode 策略违规

android - 重叠图像(扑克牌)

java - 在我的 mainActivity 中找不到 DataBindingUtil

android - 在 Android >= 2.3 浏览器中嵌入背景音频

android - 系统什么时候调用adapter的getview函数

r - Plotly:如何自定义圆环图中的颜色?

java - Android - TextView 不显示