I have some remoteView with ImageViews, and I need to change the "android:background" programmatically.
I know how to change the "android:src" with:
remoteView.setImageViewResource(int viewId, int srcId);
And it works fine, but how do I change the "android:background"?
Thanks
You can use public void setInt (int viewId, String methodName, int value)
method.
remoteView.setInt(R.id.viewid, "setBackgroundResource", R.color.your_color)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With