Gai*_*ter 3 android android-widget android-layout
我试图将整个屏幕的背景改为白色.我通过将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"** >
Run Code Online (Sandbox Code Playgroud)
我也尝试过这个程序,就像这个setContentView(R.layout.main); LinearLayout linLay =(LinearLayout)findViewById(R.layout.main);
linLay.setBackgroundColor(Color.WHITE);
但应用程序抛出错误
您是否可以发布复制问题所需的完整代码?
这对我来说很好:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF">Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
31215 次 |
| 最近记录: |