I can set the background for a button on the remoteViews by using setInt method with Drawbale Id in the Drawable folder:
remoteViews.setInt(R.id.btn_avatar, "setBackgroundResource", R.drawable.button_image);
I am trying to set the background for the button by:
Taking a photo by camera
Convert bitmap photo to Drawable and set it to the Button
Drawable drawableIcon = new BitmapDrawable(this.context.getResources(), myBitmap);
The problem is that the drawableIcon object does not has R.drawable Id to use with setInt method.
Can you please suggest me another method to set the drawableIcon object as button Background.
Thank you so much!
RemoteView have api below
try this method. no need to convert Drawable.