【发布时间】:2012-04-22 18:43:50
【问题描述】:
我想创建一个背景,其中包含水平和垂直重复的图像。在整个背景之上,我想应用从白色到透明的渐变,覆盖背景的一半。 现在,我想知道我是否可以用 style 做到这一点。这是因为我收到了这个警告:
"Possible overdraw: Root element paints background @drawable/background with a
theme that also paints a background (inferred theme is @android:style/Theme)"
看起来背景应用了两次,一次是默认主题 (Theme),然后是我的布局、可绘制元素或其他。
所以,我的问题是:如何通过创建新主题或创建可绘制对象并禁用会被新主题透支的默认主题背景来做到这一点?
谢谢大家!
【问题讨论】:
标签: android background gradient repeat