### Java Programmatic Configuration of FloatingMenuButton Animations Source: https://github.com/rjsvieira/floatingmenu/blob/master/README.md This Java example demonstrates how to programmatically configure a FloatingMenuButton, setting its start and end angles, animation type, and movement style. It also shows how to access and customize the animation handler's properties, such as durations, interpolators, and visual effects. ```Java floatingButton = (FloatingMenuButton) findViewById(R.id.my_floating_button); floatingButton.setStartAngle(0) .setEndAngle(360) .setAnimationType(AnimationType.EXPAND) .setMovementStyle(MovementStyle.STICKED_TO_SIDES); floatingButton.getAnimationHandler() .setOpeningAnimationDuration(500) .setClosingAnimationDuration(200) .setLagBetweenItems(0) .setOpeningInterpolator(new FastOutSlowInInterpolator()) .setClosingInterpolator(new FastOutLinearInInterpolator()) .shouldFade(true) .shouldScale(true) .shouldRotate(false); ``` -------------------------------- ### Add Jitpack Repository to Root Gradle Source: https://github.com/rjsvieira/floatingmenu/blob/master/README.md This snippet adds the Jitpack Maven repository to the `allprojects` block in your root `build.gradle` file, allowing your project to resolve dependencies hosted on Jitpack. ```groovy allprojects { repositories { ... maven { url 'https://jitpack.io' } } } ``` -------------------------------- ### FloatingMenu Animation Handler Configuration Parameters Source: https://github.com/rjsvieira/floatingmenu/blob/master/README.md This section details the configurable parameters for the FloatingMenu's animation handler, including durations, interpolators, and visual effects like rotation, fading, and scaling. These parameters control the behavior and appearance of the menu's opening and closing animations. ```APIDOC openingDuration | int | The opening duration, in milliseconds, of the animation | 500 closingDuration | int | The closing duration, in milliseconds, of the animation | 500 lagBetweenItems | int | The lag duration between animating items. Affects only AnimationType.EXPAND | 100 openingInterpolator | Interpolator | The opening interpolator. Allows different rythms on the animations| OvershootInterpolator closingInterpolator | Interpolator | The closing interpolator. Allows different rythms on the animations | AccelerateDecelerateInterpolator shouldRotate | boolean | Specify whether the items should rotate while animating. Available only in AnimationType.EXPAND | true shouldFade | boolean | Specify whether the items should fade while animating. Available only in AnimationType.EXPAND | true shouldScale | boolean | Specify whether the items should scale while animating. Available only in AnimationType.EXPAND | true ``` -------------------------------- ### Add FloatingMenu Dependency to App Gradle Source: https://github.com/rjsvieira/floatingmenu/blob/master/README.md This snippet adds the FloatingMenu library as a compile dependency to your `app/build.gradle` file, making it available for use in your Android application. ```groovy dependencies { compile 'com.github.rjsvieira:floatingMenu:1.3.0' } ``` -------------------------------- ### Add FloatingSubButton Programmatically Source: https://github.com/rjsvieira/floatingmenu/blob/master/README.md This Java snippet shows how to instantiate a `FloatingSubButton` programmatically, set its background drawable, and then add it to its parent `FloatingMenuButton`. It demonstrates options for adding with custom layout parameters or using default parameters. ```java FloatingSubButton floatingSubButton = new FloatingSubButton(this); // create the button floatingSubButton.setBackground(getDrawable(R.drawable.four)); // specify a custom background floatingButton.addFloatingSubButton(floatingSubButton, customLayoutParameters); // or floatingButton.addFloatingSubButton(floatingSubButton); ``` -------------------------------- ### Java Interface for FloatingMenuButton State Change Listener Source: https://github.com/rjsvieira/floatingmenu/blob/master/README.md This Java interface defines callbacks for tracking the open and closed states of a FloatingMenuButton. Implementers can use `onMenuOpened` and `onMenuClosed` methods to react to menu state changes. ```Java public interface FloatingMenuButtonStateChangeListener { void onMenuOpened(FloatingMenuButton menu); void onMenuClosed(FloatingMenuButton menu); } ``` -------------------------------- ### FloatingMenuButton XML Attribute Configuration Source: https://github.com/rjsvieira/floatingmenu/blob/master/README.md This table lists the configurable XML attributes for the `FloatingMenuButton` component, detailing their types, default values, and descriptions. These attributes control the menu's appearance and behavior, such as animation, disposition, and sub-button radius. ```APIDOC Attribute: startAngle Type: int Description: The starting angle for button disposition Default: 0 Attribute: endAngle Type: int Description: The ending angle for button disposition Default: 180 Attribute: radius Type: int Description: The distance between the central button and its children Default: 100(dp) Attribute: movementStyle Type: MovementStyle (Enumerator) Description: Configures whether the user can or not drag the FloatingMenu around Default: MovementStyle.FREE Attribute: animationType Type: AnimationType (Enumerator) Description: The open/close animation for FloatingMenuButton Default: AnimationType.EXPAND ``` -------------------------------- ### Define FloatingMenuButton and SubButtons in XML Source: https://github.com/rjsvieira/floatingmenu/blob/master/README.md This XML snippet demonstrates how to define a `FloatingMenuButton` and its `FloatingSubButton` children in an Android layout file. It showcases various attributes for customization, including animation type, disposition angles, and sub-button radius. ```xml ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.