当前位置: 首页 > 软件库 > 手机/移动开发 > >

android-flat-button

FButton - a flat button library for Android
授权协议 Apache-2.0 License
开发语言 Java
所属分类 手机/移动开发
软件类型 开源软件
地区 不详
投 递 者 时宾实
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

FButton

FButton is a custom Button of Android with "Flat UI" concept. FButton's design get inspiration from designmono. This library is very small and highly customizable.

Demo application on playstore:https://play.google.com/store/apps/details?id=info.hoang8f.fbutton.demo

Screenshot

Including in your project

###Using MavenFButton Library is pushed to Maven Central, so you just need to add the following dependency to your build.gradle.

dependencies {
    compile 'info.hoang8f:fbutton:1.0.5'
}

###ManuallyCopy/merge the following files to corresponding folder/file:

  • info/hoang8f/widget/FButton.java
  • res/values/attrs.xml
  • res/values/colors.xml
  • res/values/dimens.xml

Customizable attributes

Attribute default value xml java
button color #3eadeb buttonColor setButtonColor(int color)
enable shadow true shadowEnabled setShadowEnabled(boolean isEnabled)
shadow color Automatically generated
from button color
shadowColor setShadowColor(int color)
shadow height 4dp shadowHeight setShadowHeight(int height)
corner radius 8dp cornerRadius setCornerRadius(int radius)

Usage

If the default values of custom attribues did not meet your requirement, you can easily re-config that attributes. This is sample code that you can refer. you can also browse demo app for more details.

via xml (sample)

  • Define xmlns:fbutton="http://schemas.android.com/apk/res-auto" on root of your xml file
<info.hoang8f.widget.FButton
    ...
   fbutton:buttonColor="@color/color_concrete"
   fbutton:shadowColor="@color/color_asbestos"
   fbutton:shadowEnabled="true"
   fbutton:shadowHeight="5dp"
   fbutton:cornerRadius="5dp"
    ...
     />

via code (sample)

disabledBtn.setButtonColor(getResources().getColor(R.color.color_concrete));
disabledBtn.setShadowColor(getResources().getColor(R.color.color_asbestos));
disabledBtn.setShadowEnabled(true);
disabledBtn.setShadowHeight(5);
disabledBtn.setCornerRadius(5);

Color Swatches

For your convenience Swatches Preset by designmono are also defined in this library

//Color Swatches provided by http://designmodo.github.io/Flat-UI/
<color name="fbutton_color_turquoise">#1abc9c</color>
<color name="fbutton_color_green_sea">#16a085</color>
<color name="fbutton_color_emerald">#2ecc71</color>
<color name="fbutton_color_nephritis">#27ae60</color>
<color name="fbutton_color_peter_river">#3498db</color>
<color name="fbutton_color_belize_hole">#2980b9</color>
<color name="fbutton_color_amethyst">#9b59b6</color>
<color name="fbutton_color_wisteria">#8e44ad</color>
<color name="fbutton_color_wet_asphalt">#34495e</color>
<color name="fbutton_color_midnight_blue">#2c3e50</color>
<color name="fbutton_color_sun_flower">#f1c40f</color>
<color name="fbutton_color_orange">#f39c12</color>
<color name="fbutton_color_carrot">#e67e22</color>
<color name="fbutton_color_pumpkin">#d35400</color>
<color name="fbutton_color_alizarin">#e74c3c</color>
<color name="fbutton_color_pomegranate">#c0392b</color>
<color name="fbutton_color_clouds">#ecf0f1</color>
<color name="fbutton_color_silver">#bdc3c7</color>
<color name="fbutton_color_concrete">#95a5a6</color>
<color name="fbutton_color_asbestos">#7f8c8d</color>

Developed By

Le Van Hoang (@hoang8f)

License

   Copyright {2014} {Le Van Hoang}

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
  • 原Github地址:https://github.com/hoang8f/android-flat-button 使用方法: 1.加入gradle依赖: compile 'info.hoang8f:fbutton:1.0.5' 2.加入FButton的java文件: import android.content.Context; import android.content.res.Resourc

  • You need to provide child and onPressed parameter in order to render the widget, else it won't render, which results in non working UI. Check out the code i modified : import 'package:flutter/material

  • Android按钮背景颜色(Android button background color) 我想在我的应用程序中设置按钮的背景颜色,我无法实现我想要的结果... 我试图设置的颜色是holo_green_light(#ff99cc00) 。 为了做到这一点,我使用setColorFilter(0xff99cc00, PorterDuff.Mode.MULTIPLY); 我得到的颜色不是holo_g

  • 引言 Android为我们提供了消息循环的机制,我们可以利用这个机制来实现线程间的通信。那么,我们就可以在非UI线程发送消息到UI线程,最终让UI线程来进行UI的操作。 对于运算量较大的操作和IO操作或者网络请求,我们需要新开线程来处理这些繁重的工作,以免阻塞UI线程。 Thread+Handler HandlerThread一般用于批处理,在需要切换对象较多的情况下。 使用: 创建Handler

 相关资料
  • 此函数返回数组上的1-D迭代器。 它的行为类似于Python的内置迭代器。 例子 (Example) import numpy as np a = np.arange(8).reshape(2,4) print 'The original array:' print a print '\n' print 'After applying the flat function:' # ret

  • Agora Flat 在线教室是专门给个人使用的在线授课软件,界面简洁、开箱即用,功能与 classin 类似:白板教学、音视频互动、举手连麦、录制回放这些功能都是支持的。 产品概述 Agora Flat 在线教室,功能与 classin 在线互动教室类似,是 Classin 和腾讯会议优势互补的一个开源替代品,供个人老师直接使用。   我们努力克制,希望 Flat 是一个简单、清爽的、专注课中互

  • Flat UI 是一套精美的扁平风格 UI 工具包,基于 Twitter Bootstrap 实现。这套界面工具包含许多基本的和复杂的 UI 部件,例如按钮,输入框,组合按钮,复选框,单选按钮,标签,菜单,进度条和滑块,导航元素等等。

  • Flat Assembler 是一个快速高效的80x86的汇编工具,支持DOS、Windows、Linux操作系统,支持包括 8086-80486/Pentium instructions with MMX, SSE, SSE2, SSE3, and 3DNow! extensions and x86-64 (both AMD64 and EM64T) 指令集。

  • Flat Select jQuery Plugin - converting a select element to a flat divs elements JSON version

  • Flat-SlideControl 可以控制扁平设计,可以再一个范围值内选择。