Calling setCompoundDrawables() doesn't display the Compound Drawable

后端 未结 10 1013
自闭症患者
自闭症患者 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 08:02

    I needed to be using setCompoundDrawablesWithIntrinsicBounds.

提交回复
热议问题