[转]代码实现渐变背景
16lz
2021-01-23
转自: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一样用法
更多相关文章
- 控件:TouchProject(绘图) --- 触摸事件
- 背景圆角以及图片圆角处理
- android 拍照,图片裁剪,选择图片
- 控件_RadioGroup&&RadioButton(单选按钮)和Toast
- Android 压缩图片并转Base64方法之一
- Android的xml布局文件代码讲解(TextView控件)
- Android关于ListView显示SD卡上的Bitmap的图片(图片压缩之后)