各位大神---求助关于背景颜色的问题
main,.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/grey"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
</LinearLayout>
color.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<drawable name="darkgray">#808080FF </drawable>
<drawable name="white">#FFFFFFF</drawable>
</resources>
没报错跑起来背景还是没变,这是为什么呢
[解决办法]
color.xml放在res/values下
- XML code
<?xml version="1.0" encoding="utf-8"?><resources> <drawable name="darkgray">#808080FF </drawable> <drawable name="white">#FFFFFFFF</drawable> </resources>
[解决办法]