您的位置:首页 > 移动开发 > Android开发

android 按钮自动生成工具

2015-12-11 09:16 253 查看
对于入行不久的朋友们有福了,这里有一个按钮自动生成工具,基本属性、背景、阴影什么都不是问题,输入参数,立马生成代码,方便快捷,经理再也不会嫌我做的按钮效果难看了。

示例如图:



按钮属性xml:

<Button
android:id="@+id/angry_btn"

android:text="Button"
android:textColor="#FFFFFF"
android:textSize="21sp"

android:layout_width="250dp"
android:layout_height="60dp"
android:background="@drawable/buttonshape"
android:shadowColor="#A8A8A8"
android:shadowDx="0"
android:shadowDy="0"
android:shadowRadius="5"
/>


背景xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<corners
android:radius="8dp"
/>
<gradient
android:gradientRadius="100"
android:centerX="50%"
android:centerY="50%"
android:centerColor="#367BD6"
android:startColor="#E8E8E8"
android:endColor="#000000"
android:type="radial"
/>
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
/>
<size
android:width="250dp"
android:height="60dp"
/>
<stroke
android:width="2dp"
android:color="#878787"
/>
</shape>


网址:
http://angrytools.com/android/button/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: