背景渐变色(shape,gradient)-Andoird
来源:互联网 发布:内存数据恢复软件 编辑:程序博客网 时间:2024/05/17 20:24
知识简介
shape是用来定义形状的,gradient定义该形状里面为渐变色填充,startColor起始颜色,endColor结束颜色,angle表示方向角度。当angle=0时,渐变色是从左向右。 然后逆时针方向转,当angle=90时为从下往上。
实现过程:
第一步:
res/drawable/background_login.xml
[代码]xml代码:
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#FFF" android:endColor="#000" android:angle="45" /></shape>
第二步:
res/layout/login.xml
[代码]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/background_login"></LinearLayout>
常用颜色
常用颜色的链接
0 0
- 背景渐变色(shape,gradient)-Andoird
- 1. android 背景渐变色(shape,gradient)
- android 背景渐变色(shape,gradient)
- android 背景渐变色(shape,gradient)
- android 背景渐变色(shape,gradient)
- android 背景渐变色(shape,gradient)
- android 背景渐变色(shape,gradient)
- android 背景渐变色(shape,gradient)
- android 背景渐变色(shape,gradient)
- android 背景渐变色(shape,gradient)
- Android背景渐变色(shape,gradient)
- Android背景渐变色(shape,gradient)
- Android背景渐变色(shape,gradient)
- Android背景渐变色(shape,gradient)
- Android背景渐变色(shape,gradient)
- Android背景渐变色(shape,gradient)
- Android背景渐变色(shape,gradient)
- Android背景渐变色(shape,gradient)
- java des加解密算法
- 减法变加法-计算机中的补码表示
- 读书笔记(二)
- 判断当前网络状态 显示网络小图标
- mac 安装node问题
- 背景渐变色(shape,gradient)-Andoird
- Gsoap搭建WebService服务的一个简单实现(windows)
- C/C++函数调用过程分析
- ubuntu15.10安装并使用Git@OSC(一)
- python基础教程_list列表生成式
- String StringBuffer StringBuilder 区别
- 手把手教你使用Git
- sql server2014,sql server实例数据库的还原
- 经典的JavaScript开发技巧