我刚刚开始在Android,并正在启动一个启动画面。我试图将默认背景颜色更改为灰色,但显然我无法两次使用相同的属性。我如何添加背景图片并更改背景颜色?谢谢。定义两次可能的相同属性?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/reddit_alien"
android:background="@color/grey"
>
</LinearLayout>
“如何添加背景图像并更改背景颜色?” - 根据定义,这是不可能的,因为只有*一个*背景。它是一个图像*或*一种颜色。编辑您的图像以包含您想要的颜色。 – CommonsWare