我正在基于来自 sharedpreferences 的字符串创建一个动态接口。
这是我的代码
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
CreateInterface();
}//End-OnCreate
public void CreateInterface()
{
ScrollView sv = new ScrollView(this);
LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.VERTICAL);
TableLayout tl = new TableLayout(this);
TableRow[] tr = null;
// Here is a loop that creates tablerow, create button in that, and add tablerow to tablelayout tl. This part is irrelevant couse it works perfectly.
ll.addView(tl);
sv.addView(ll);
setContentView(sv);
}
现在,我想更改屏幕的背景颜色。我该怎么做呢?