button如何动态设置drawableBottom(setCompoundDrawables 无效)

274 阅读1分钟

获取到Drawable 资源后,setBounds,setCompoundDrawables

 Drawable drawable = getResources().getDrawable(R.drawable.quick_login);
                drawable.setBounds(0 ,0,drawable.getMinimumWidth(),drawable.getMinimumHeight());
                normalLoginBt.setCompoundDrawables(null,null,null,drawable);