Git Product home page Git Product logo

flatbutton's Introduction

FlatButton

Reason

最近专注于Material Design,觉得默认的按钮色彩不够鲜明,在寻找一些替代的方案,Flat Ui 就是选择之一。

https://github.com/hoang8f/android-flat-button 这个库在 android 5.0 下的表现并不好。

https://github.com/eluleci/FlatUI 这个库对我来说又太大,我只关注 button。

好吧,还有些其他问题。

  1. 在 disabled 状态下,按钮还是可点击的,我修正了这个问题。

  2. 使用自定义主题需要配置4种颜色,这很麻烦。

  3. 因为需要配置4种颜色,无法随着 material 主题的改变而自动改变颜色。

所有源码来自:https://github.com/eluleci/FlatUI

Example

github

Usage

    <com.ivo.flatbutton.FlatButton
        android:text="确认"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:enabled="false"
        flatui:fl_textAppearance="fl_none"
        flatui:fl_blockButtonEffectHeight="3dp"
        flatui:fl_touchEffect="fl_ease"
        flatui:fl_mainColor="@android:color/holo_blue_light"
        android:layout_marginTop="5dp" />

Aar

https://github.com/Ivolian/FlatButton/blob/master/flatbutton.aar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.