Calling setCompoundDrawables() doesn't display the Compound Drawable

后端 未结 10 1012
自闭症患者
自闭症患者 2020-12-04 06:58

After I call the setCompoundDrawables method, the compound Drawable is not shown..

Drawable myDrawable = getResources().getDrawable(R.drawable.btn);
btn.setC         


        
10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 07:44

    For me setCompoundDrawablesWithIntrinsicBounds(Drawable, Drawable, Drawable, Drawable) did not work.

    I had to use setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0).

提交回复
热议问题