From this page:
public void setBackgroundResource (int resid)
Se开发者_开发知识库t the background to a given resource. The resource should refer to a Drawable object or 0 to remove the background.
So how do I refer to a Drawable object by an int id?
The common use case is
setBackgroundResource(R.drawable.mydrawable)
The R class contains an auto-generated int reference to each drawable resource in the project folder.
This has no use if you generate your Drawable in code or from any other source than the projects resources (that's why it's called setBackgroundRESOURCE()).
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论