zoukankan      html  css  js  c++  java
  • 一个类似抖音 APP 拍摄按钮效果的控件

    TouchButton

    一个类似抖音 APP 拍摄按钮效果的控件

    效果图预览

    效果图

    用法

    <net.angrycode.library.TouchButton
            android:id="@+id/touch_btn"
            android:layout_width="85dp"
            android:layout_height="85dp"
            android:layout_centerInParent="true"
            app:tb_anim_padding="14dp"
            app:tb_color="@color/colorAccent"
            app:tb_text="Hold" />

    自定义属性

    <declare-styleable name="TouchButton">
    <attr name="tb_text" format="string|reference" />
    <attr name="tb_text_color" format="color|reference" />
    <attr name="tb_color" format="color|reference" />
    <attr name="tb_anim_padding" format="dimension|reference" />
    </declare-styleable>
    

      

    属性说明

    属性描述默认值
    tbanimpadding 动画边距 10dp
    tb_color 按钮背景 #FF4081
    tb_text 按钮文本 Hold
    tbtextcolor 按钮文本颜色 #ffffffff

    微信公众号

    Android填坑指南(AngryCode)

    微信关注我们,可以获取更多

  • 相关阅读:
    oracle中文乱码问题
    并发登录查询
    AJAX 笔记
    jQuery笔记
    js BOM 笔记
    HTML DOM笔记
    JS函数笔记
    js笔记
    json笔记
    css3笔记
  • 原文地址:https://www.cnblogs.com/angrycode/p/7898517.html
Copyright © 2011-2022 走看看