使用Android自定义格式的定义Button
2013-04-02 00:52
197 查看
先把来源贴上
http://zrgiu.com/blog/2011/01/making-your-android-app-look-better/
http://www.dibbus.com/2011/02/gradient-buttons-for-android/
http://www.dibbus.com/2011/08/even-more-gradient-buttons-for-android/
然后再让大家看看效果,这些都是xml布局文件实现的,一张图片都未曾使用。
顺便贴出几个布局文件给大家看看:
这里有个工程,开源的
http://code.google.com/p/android-gradients-sample/downloads/list
顺便把这两个网页给收了,说不定以后能够提供灵感或者参考
http://www.webdesignshock.com/css-button
/article/1301067.html
http://zrgiu.com/blog/2011/01/making-your-android-app-look-better/
http://www.dibbus.com/2011/02/gradient-buttons-for-android/
http://www.dibbus.com/2011/08/even-more-gradient-buttons-for-android/
然后再让大家看看效果,这些都是xml布局文件实现的,一张图片都未曾使用。
顺便贴出几个布局文件给大家看看:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" > <shape> <solid android:color="#449def" /> <stroke android:width="1dp" android:color="#2f6699" /> <corners android:radius="3dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item> <item> <shape> <gradient android:startColor="#449def" android:endColor="#2f6699" android:angle="270" /> <stroke android:width="1dp" android:color="#2f6699" /> <corners android:radius="4dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item> </selector>
<?xml version=”1.0″ encoding=”UTF-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android”> <solid android:color=”#F000″/> <stroke android:width=”1px” android:color=”#BB000000″ /> <padding android:left=”10dp” android:top=”7dp” android:right=”10dp” android:bottom=”7dp” /> <corners android:bottomRightRadius=”5dp” android:bottomLeftRadius=”5dp” android:topLeftRadius=”5dp” android:topRightRadius=”5dp” /> <gradient android:angle=”90″ android:startColor=”#4747e0″ android:centerColor=”#5b5bcd” android:endColor=”#6f6fcf” android:type=”linear” /> </shape>
这里有个工程,开源的
http://code.google.com/p/android-gradients-sample/downloads/list
顺便把这两个网页给收了,说不定以后能够提供灵感或者参考
http://www.webdesignshock.com/css-button
/article/1301067.html
相关文章推荐
- 使用Android自定义格式的定义Button
- android 自定义Button 及Animation的基本使用
- android 自定义字体 字体库 字体格式 使用攻略
- android自定义Glide图片加载(以更改Glide缓存路径和使用ARGB_8888的图片格式为例)
- android使用xml自定义button样式
- android自定义Button,通过在XML布局文件里直接使用自定义参数
- Android使用xml自定义Button按钮显示样式
- Android中selector的使用(二)之自定义Button
- android 自定义Button 及Animation的基本使用
- Android使用xml定义带背景Button(解决ImageButton不能加文字的问题)
- Android studio使用自定义的格式化文件或者eclipse的格式文件
- Android自定义格式显示Button的布局思路
- android 自定义字体 字体库 字体格式 使用攻略
- Android自定义格式显示Button的布局思路
- Android自定义属性的定义及使用
- Android高手进阶教程(六)之 ----Android 中MenuInflater的使用(布局定义菜单)
- 【Android】Android中Serializable接口的定义和使用
- Android实现自定义带文字和图片的Button
- Android自己定义控件系列二:自己定义开关button(一)
- android开发小技巧(3)dialog自定义弹出框的使用