I am trying to create a widget button with rounded corners which I can also change to ANY colour I want. I currently use an xml layout file to create the rounded corners. The problem is when I change the colour the button returns to its rectangular shape. I would like for it to maintain at least its rounded corners.
I can't find a solution for this but any ideas gratefully received. It may not be possible but thought I'd ask. The main point is that I am trying to do this with remote views as part of a widget NOT in an activity which is easy to do.
Happy to consider any options...
RemoteViews views; views = new RemoteViews(context.getPackageName(), R.layout.mycustomlayout); views.setInt(R.id.widgetbutton,"setBackgroundColor", Color.parseColor(widgethexcolor));