【发布时间】:2011-03-27 01:25:25
【问题描述】:
我正在尝试将整个屏幕的背景更改为白色。我通过将 android:background="#ffffff" 属性添加到 linerlayout 来做到这一点。但它不起作用,我不知道我错过了什么?
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"** >
我也尝试过编程,类似这样
设置内容视图(R.layout.main);
线性布局 linLay = (LinearLayout) findViewById(R.layout.main);
linLay.setBackgroundColor(Color.WHITE);
但应用程序抛出错误
【问题讨论】:
标签: android android-widget android-layout