I need to set the border colour and fill colour of a shapedrawable to different colours. How can I set both colours and have the shape as fill and stroke?
Say I have this:
ShapeDrawable border = new ShapeDrawable(new RectShape());
border.getPaint().setStyle(Paint.Style.FILL_AND_STROKE);
border.getPaint().setColor(Color.WHITE);
border.getPaint().setStrokeColour(Color.BLACK); //???????? How to do
Edit: My question is not a duplicate of Android ShapeDrawable set Background and Border programmatically because that question's only answer is unclear and does not help me.