Friday, 9 November 2018

Android setCompoundDrawablePadding not working

I have a TextInputEditText in my layout to which I need to add a drawable end. Drawable end is appearing but I am not able to add drawable padding end to it.

Below is the piece of code which I tried:

  editText.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.drawable.error), null);
  editText.setCompoundDrawablePadding(getResources().getDimensionPixelSize(R.dimen.image_padding));



from Android setCompoundDrawablePadding not working

No comments:

Post a Comment