setImage和setBackgroundImage区别

来源:互联网 发布:cit是什么软件 编辑:程序博客网 时间:2024/06/05 17:35

用setBackgoundImage时,不管按钮是system还是custom,图片和标题都正常显示

用setImage时,按钮是custom时,图片正常显示,标题不显示

用setImage时,按钮是system时,图片标题都不显示

如下图所示:

第一个和第四个是用setBackgroundImage

第二个和第三个用setimage,按钮类型分别是system和custom

所以,任何时候都用setImageBackground就对了!!!!!!!

0 0
原创粉丝点击