当前位置:网站首页>Button how to dynamically set drawablebottom (setcomposunddrawables is invalid)

Button how to dynamically set drawablebottom (setcomposunddrawables is invalid)

2022-06-26 18:57:00 xiyangyang8110

Get Drawable After resources ,setBounds,setCompoundDrawables

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

版权声明
本文为[xiyangyang8110]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202161738585630.html