我正在尝试将整个屏幕的背景更改为白色。我通过将android:background="#ffffff"属性添加到linearLayout来实现它。但是它没有起作用,我不知道我错过了什么?
http://developer.android.com/reference/android/widget/LinearLayout.html
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:padding="10dip"
android:layout_width="fill_parent" android:layout_height="wrap_content"
**android:background="#ffffff"** >
我也尝试了编程方式,类似于这样的代码 setContentView(R.layout.main); LinearLayout linLay = (LinearLayout) findViewById(R.layout.main);
linLay.setBackgroundColor(Color.WHITE);
但应用程序抛出错误。