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

FabulousFilter

> 编程语言
开源

用于将浮动动作按钮动画到底部弹出对话框,以及反之亦然的 Android 库

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

工具介绍

用于将浮动动作按钮动画到底部弹出对话框,以及反之亦然的 Android 库

FabulousFilter

Show some :heart: and star the repo to support the project


This library is the implementation of filter-concept posted on MaterialUp.com.

It makes animation of FloatingActionButton to BottomSheetDialog easy to implement.

Concept

Demo

Download

Gradle

Add the dependency to your app-level build.gradle file:

dependencies {
	 implementation 'io.github.krupen:fabulousfilter:0.0.6'
}

Usage

Create a Fragment that extends AAH_FabulousFragment:

…

Create view for the fragment which has parent element AAH_FilterView:

…

Start the fragment on click of FloatingActionButton as below:

fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                MySampleFabFragment dialogFrag = MySampleFabFragment.newInstance();
                dialogFrag.setParentFab(fab);
                dialogFrag.show(getSupportFragmentManager(), dialogFrag.getTag());
            }
        });

Parameters

  • Main View (Required)

This parameter specifies the ViewGroup of the bottom sheet to be shown after animation ends. It can be any ViewGroup(LinearLayout/FrameLayout etc):

setViewMain(relativelayout_content);
  • Inflated Dialog View (Required)

This parameter specifies the inflated view for the dialog:

setMainContentView(contentDialogView);
  • Animation duration (Optional)

This parameter sets animation duration of translate and scale animation in milliseconds:

setAnimationDuration(600); // default 500ms
  • Interpolator (Optional)

This parameter is used to set interpolator for fab animation:

setInterpolator(new AccelerateDecelerateInterpolator());
  • Peek Height (Optional)

This parameter sets the peek height of the bottom sheet in dp:

setPeekHeight(300); // default 400dp
  • Callback (Optional)

This parameter is used to get callback from AAH_FabulousFragment to the component that called it:

setCallbacks((Callbacks) getActivity());

To use it, implement the callback in the calling component(Activity/Fragment etc), example:

public class MainSampleActivity extends AppCompatActivity implements AAH_FabulousFragment.Callbacks {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_sample);
    }

    @Override
    public void onResult(Object result) {
        if (result.toString().equalsIgnoreCase("swiped_down")) {
            //do something or nothing
        } else {
            //handle result
        }
    }
}
  • Animation Listener (Optional)

This parameter is used to get animation callbacks.

setAnimationListener((AnimationListener) getActivity());

To use it, implement the AnimationListener in the calling component(Activity/Fragment etc), example:

…
  • Static View (Optional)

This parameter is used to make view in Bottom Sheet static when user slides it. It can be any ViewGroup(LinearLayout/FrameLayout etc):

setViewgroupStatic(linearlayout_buttons);
  • ViewPager (Optional)

This parameter is used to support scrolling in ViewPager as BottomSheetDialog does not support multiple views with scroll:

setViewPager(viewPager);

Libraries by developer

  • AutoplayVideos

Apps by developer

License

Copyright 2017 Krupen Ghetiya

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 Issues· 0 开放

在 GitHub 查看全部

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

> 标签

Javaanimateanimationbottomsheetbottomsheetbehavior

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

> 工具信息

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

> 相关工具

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