首页 > 代码库 > The method setBackgroundDrawable(Drawable) from the type View is deprecated

The method setBackgroundDrawable(Drawable) from the type View is deprecated

这表示方法:setBackgroundDrawable(Drawable)已被遗弃,用setBackgroundResource(resid)替换即可,并且使用更方便


eg:

button[initial_i][initial_j].setBackgroundResource(R.drawable.hero);



本文出自 “zifangsky” 博客,请务必保留此出处http://983836259.blog.51cto.com/7311475/1552628

The method setBackgroundDrawable(Drawable) from the type View is deprecated