android 按钮自动生成工具

来源:互联网 发布:mac vscode golang 编辑:程序博客网 时间:2024/05/20 06:23

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

示例如图:



按钮属性xml:

<Buttonandroid: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" ><cornersandroid:radius="8dp"/><gradientandroid:gradientRadius="100"android:centerX="50%"android:centerY="50%"android:centerColor="#367BD6"android:startColor="#E8E8E8"android:endColor="#000000"android:type="radial"/><paddingandroid:left="0dp"android:top="0dp"android:right="0dp"android:bottom="0dp"/><sizeandroid:width="250dp"android:height="60dp"/><strokeandroid:width="2dp"android:color="#878787"/></shape>


网址:

http://angrytools.com/android/button/

0 0
原创粉丝点击