Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

FabulousFilter

> 编程语言
Open source

Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa

2.7K stars0 likes0 views
WebsiteGitHub

About

Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa

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 open

View all on GitHub

No open issues yet, or sync has not completed.

Highlights

  • •### Main View (Required)
  • •### Inflated Dialog View (Required)
  • •### Animation duration (Optional)
  • •### Interpolator (Optional)
  • •### Peek Height (Optional)
  • •### Callback (Optional)
  • •### Animation Listener (Optional)
  • •### Static View (Optional)
  • •### ViewPager (Optional)
  • •<a href="https://github.com/Krupen/AutoplayVideos" target="_blank">AutoplayVideos</a>

> Tags

Javaanimateanimationbottomsheetbottomsheetbehavior

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

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