getCompoundDrawables returns null inside of onCreateView, but not later
Change android:drawableEnd
to android:drawableRight
. Not sure why but drawableEnd returns null in onCreate() method and drawableRight works fine.
for android:drawableRight
, you should use getCompoundDrawables()
, where as for android:drawableEnd
, you should use getCompoundDrawablesRelative()
.
getCompoundDrawablesRelative()