I have to draw buttons depending on the user.
These buttons have to be rounded corners and with gradient background.

To achieve this result, here is my code that create a button:

```
        ImageButton btn = new ImageButton(this);
        btn.setBackgroundDrawable(null);
        GradientDrawable gradientNormal = new GradientDrawable(Orientation.BOTTOM_TOP,
                new int[] { cc.getColorSelector()[1], cc.getColorSelector()[0] });
        GradientDrawable gradientPressed = new GradientDrawable(Orientation.BOTTOM_TOP,
                new int[] { cc.getColorSelector()[0], cc.getColorSelector()[1] });
        StateListDrawable stateListDrawable = new StateListDrawable();
        stateListDrawable.addState(new int[] { android.R.attr.state_pressed }, gradientPressed);
        stateListDrawable.addState(new int[] {}, gradientNormal);
        RoundRectShape rect = new RoundRectShape(new float[] { 30, 30, 30,
                30, 30, 30, 30, 30 }, null, null);
        ShapeDrawable bg = new ShapeDrawable(rect);

```

The cc.getColorSelector() returns just the integer color.

Now I need to merge the shape of ShapeDrawable with the color of StateListDrawable, in order to have a single drawable I can use as background of my button.

How can I do that, please?