ITeye博客

[转]代码实现渐变背景

119568242 · 2011-11-16 14:22 · Android · 移动开发 · Markdown

转自:http://www.iteye.com/topic/1117561

 

 

<shape xmlns:android="http://schemas.android.com/apk/res/android"  
    android:shape="rectangle">  
    <gradient  
        android:startColor="#ffffff"  
        android:endColor="#EDEDED"  
        android:angle="-90" />  
</shape>  

 

 

和图片一样 放入drawable  配置好把它看成图片调用就好了~

控件xml中 调用 android:background="@drawable/pull_to_refresh_header_background" 是不是很简单 ~

 

 

P注:放在drawable下 和selector一样用法

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。