I want to add a Drawable Image to my button on the left and tried the following:
button = new Button(this); button.setWidth(screen_dimens(0.25, "w")); //25% of screen width button.setPadding(5, 5, 0, 5); Drawable img = getResources().getDrawable(R.drawable.image); button.setCompoundDrawablesWithIntrinsicBounds(img, null, null, null);
But I want to have a registration on the left between the valid and the border of the button. Unfortunately, they are not.
Any help?
source share