selector + shape
selector_shape.xml<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_pressed="true">
<shape>
<corners android:radius="5dp"/>
<solid android:color="#ff0000"/>
<padding android:top="5dp" android:bottom="5dp"/>
</shape>
</item>
<item>
<shape>
<corners android:radius="10dp"/>
<solid android:color="#00ff00"/>
<padding android:top="5dp" android:bottom="5dp"/>
</shape>
</item>
</selector>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/selector_shape"
android:text="使用Selector+Shape做的按钮" />
selector + shape的更多相关文章
- Android-----使用Button特效 selector+shape
当然除了使用drawable这样的图片外今天谈下自定义图形shape的方法,对于Button控件Android上支持以下几种属性shape.gradient.stroke.corners等. 我们就以 ...
- android selector shape 使用
先上效果图 message_toolbar_left_bg_selector <?xml version="1.0" encoding="utf-8"?& ...
- Android之Selector、Shape介绍
------------整理自网络---------------------- <?xml version=”1.0″ encoding=”utf-8″?> <shape xmlns ...
- [整理]Selector、shape详解
Selector.shape详解(一) Selector的结构描述: <?xml version="1.0" encoding="utf-8"?> ...
- Selector、shape详解,注意这两种图像资源都以XML方式存放在drawable不带分辨率的文件夹中
Selector.shape详解(一) Selector的结构描述: <?xml version="1.0" encoding="utf-8"?> ...
- android selector 开始自定义样式
Selector的结构描述: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:a ...
- android selector(转)
Selector的结构描述: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:a ...
- Android UI设计系统-android selector 开始自定义样式
Selector的结构描述: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:a ...
- android中shape 的使用
android 开发中 对于 shape 和 selector的使用,一直都不是很熟练, 记录一下.便于以后参考. 举个项目中例子图 对于上面的2个radiobutton ,背景我们可以让美工做一个. ...
随机推荐
- TensorFlow笔记一 :测试和TFboard使用
一 .第一个TF python3.6 import tensorflow as tf x=2 y=3 node1=tf.add(x,y,name='node1') node2=tf.multiply ...
- 跳转前暂停几秒js如何实现
jquery如何实现跳转前暂停几秒 今天有个需求,类似答题的,需要显示结果后再跳转. 此处直接通过settimeout实现. 代码如下: url = 'www.baidu.com'; setTimeo ...
- zabbix agent shell一键安装脚本
#!/bin/bash basepath=$(cd ``; pwd) SHELL_DIR="${basepath}/shell" PACKAGE_DIR="${basep ...
- 云数据库 RDS 版怎么创建数据库和账号MySQL 5.7版
若要使用云数据库RDS,您需要在实例中创建数据库和账号.对于MySQL 5.7版本的实例,您需要通过RDS控制台创建一个初始账号,然后可以通过数据管理(DMS)控制台创建和管理数据库.本文将主要介绍在 ...
- Spring学习九----------Bean的配置之Bean的定义及作用域的注解实现
© 版权声明:本文为博主原创文章,转载请注明出处 Spring Bean常用注解 @Component:通常注解,可用于任何Bean @Repository:通常用于注解DAO层,即持久层 @Serv ...
- PHP第四课 了解经常使用的函数
学习概要: 一.语言结构 二.自己定义函数 三.变量作用域 四.静态变量 五.函数返回值 六.參数 七.默认參数 八.引用參数 九.可变个数函数 十.回调函数 十一.变量函数 十二.递归函数 十三.文 ...
- EventListener中的handleEvent
在研究代码时发现类似这样一段代码: function TEST() {} TEST.prototype = { init:function() { window.addEventListener('m ...
- Spring利用propertyConfigurer类 读取.property数据库配置文件
(1).基本的使用方法是: <bean id="propertyConfigurerForAnalysis" class="org.springframework. ...
- asp.net 后台多线程异步处理时的 进度条实现一(Ajax+Ashx实现以及封装成控件的实现)
(更新:有的同学说源代码不想看,说明也不想看,只想要一个demo,这边提供一下:http://url.cn/LPT50k (密码:TPHU)) 工作好长时间了,这期间许多功能也写成了不少的控件来使用, ...
- A charge WIFI point base on airbase-ng+dhcp+lamp+wiwiz
Make wifi as a hot point Make a script echo $0 $1 case $1 in "start") sleep 1 ifconfig wla ...