In the code, we have to use `setCompoundDrawablesWithIntrinsicBounds`. This will let us create the buttons programmatically that will consist of drawables on the left side. This method allows you to set the drawable images with a TextView that allows you to place images on left, right, bottom and top of text. Here is the syntax for the same:
public void setCompoundDrawablesWithIntrinsicBounds (int left, int top, int right, int bottom)
Now, these parameters will allow you to set the values for the drawables.