0
我想更改FrameLayout的背景。这是我的代码使用权现在:setBackground():无法从静态上下文中引用非静态方法
FrameLayout.setBackground(getResources().getDrawable(R.drawable.background));
但出现此错误:
非静态方法“的setBackground(android.graphics.drawable.Drawable)” 不能从静态引用上下文。
那里有什么问题?
可能重复[“非静态方法不能从静态上下文中引用”错误] (http://stackoverflow.com/questions/4922145/non-static-method-cannot-be-referenced-from-a-static-context-error) – EJP 2014-10-21 09:21:50