I'm trying to set a PaintDrawable as a background for a view in order to change the color dynamically and keep the borders but when i write :
vi.setBackground(pd);`
i got an error : NoSuchMethodError here is my code :
PaintDrawable pd = new PaintDrawable(color);
pd.setCornerRadius(4);
pd.setPadding(1, 1, 1, 1);
vi.setBackground(pd)
DyL.addView(vi);