【发布时间】:2011-08-21 14:58:09
【问题描述】:
我有以下梯度_bg.xml:
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:type="radial"
android:gradientRadius="200"
android:startColor="#666666"
android:endColor="#AAAAAA"
/>
</shape>
我想将此渐变用作我的应用程序的android:windowBackground 设置。然后,该应用程序将在其顶部有一些带有透明背景的视图。
我尝试过使用以下方法直接应用此渐变:
android:windowBackground="@drawable/gradient_bg"
在我的应用程序清单中,然后将滚动视图背景设置为透明,但我只获得了默认的黑色背景。
我将如何实现这个结果?我特别不想将背景应用于滚动视图。
提前感谢您的帮助。
【问题讨论】:
标签: android background window drawable gradient