如何通过代码动态改变android的窗口背景颜色
先从main.xml中获得布局组件:LinearLayout ll = (LinearLayout) findViewById(R.id.mainLayout);
然后通过 ll.setBackgroundColor(R.drawable.×××);
就可以了啊!
先从main.xml中获得布局组件:LinearLayout ll = (LinearLayout) findViewById(R.id.mainLayout);
然后通过 ll.setBackgroundColor(R.drawable.×××);
就可以了啊!