百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

RapidFloatingActionButton

> 编程语言
开源

浮动动作按钮的快速解决方案,RapidFloatingActionButton(RFAB)

1.3K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

浮动动作按钮的快速解决方案,RapidFloatingActionButton(RFAB)

RapidFloatingActionButton

Quick solutions for Floating Action Button,RapidFloatingActionButton(RFAB)

How to use:

Dependencies: AndroidBucket:The base library AndroidInject:The Inject library ShadowViewHelper:Shadow layout, shadow view for android NineOldAndroids:The Property Animation library for pre android 3.0

Newest version:

Gradle:

groovy
compile 'com.github.wangjiegulu:rfab:x.x.x'

Maven:

xml

    com.github.wangjiegulu
    rfab
    x.x.x

activity_main.xml:

xml

  

Add at outermost layout of RFAB()

Properties

RapidFloatingActionLayout:

  • rfal_frame_color: Frame color when expand RFAB,default is white color
  • rfal_frame_alpha: Frame color alpha(0 ~ 1) when expand RFAB,default is 0.7

RapidFloatingActionButton:

  • rfab_size: The size of RFAB,only support two size(Material Design):
  • normal: diameter 56dp
  • mini: diameter 40dp
  • rfab_drawable: The drawable of RFAB,default drawable is "+"
  • rfab_color_normal: Normal status color of RFAB。default is white
  • rfab_color_pressed: Pressed status color of RFAB。default is "#dddddd"
  • rfab_shadow_radius: Shadow radius of RFAB。default is 0(no shadow)
  • rfab_shadow_color: Shadow color of RFAB。default is transparent. it will be invalid if the rfab_shadow_radius is 0
  • rfab_shadow_dx: The shadow offset of RFAB(x-axis)。default is 0
  • rfab_shadow_dy: The shadow offset of RFAB(y-axis)。default is 0

MainActivity:

…

RFAB also needs an implementation of RapidFloatingActionContent to fill and assign content of RFAB when it expands.

Here is a quick solution of RapidFloatingActionContent:RapidFloatingActionContentLabelList.You can add some items(RFACLabelItem,of course not recommended to add too many items),and config color, drawable, shadow, background image, text size, color of label and animation of each item.

To preview the demo: The top picture effects or Inbox of Google.

At last,you need combine them by RapidFloatingActionButtonHelper.

About expand style:

If you don't like RapidFloatingActionContentLabelList,you can expand your content style. Extend com.wangjie.rapidfloatingactionbutton.RapidFloatingActionContent, initialize the content layout and style,and invoke setRootView(xxx); method. If you want to add more animations,override those methods:

java
public void onExpandAnimator(AnimatorSet animatorSet);
public void onCollapseAnimator(AnimatorSet animatorSet);

add your animations to the animatorSet.

License

Copyright 2015 Wang Jie

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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javaanimationcustom-viewfloatingactionbuttonrapidfloatingactionbutton

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言