MCPcopy Index your code
hub / github.com/Nightonke/BoomMenu

github.com/Nightonke/BoomMenu @main sqlite

repository ↗ · DeepWiki ↗
784 symbols 2,014 edges 67 files 244 documented · 31%
README

BoomMenu

WoWoViewPager BoomMenu CoCoin BlurLockView LeeCo GithubWidget JellyToggleButton FaceOffToggleButton

This README is only for version 1.0.9 or below. Strongly suggest to use new version

Tired of these menu buttons?

Old Menu Buttons

Why not try these:

Circle Ham

List Share

Yes, this library is about a menu which can ... BOOM!
Looking for iOS version? Check here

Guide

中文文档
Gradle & Maven
Note
Demo

Usage

  1. Easy to Use in 3 Steps
  2. Use in Action Bar
  3. Use in Floating Action Button
  4. Use in List
  5. Use in Share Style
  6. Use with Builder
  7. Hamburger Button and Circle Button
  8. Number of Sub Buttons
  9. Boom Types
  10. Place Types
  11. Ease Types
  12. Boom Animation Duration
  13. Animation Start Delay
  14. Rotation Degree
  15. Auto Dismiss
  16. Cancelable
  17. Show Order and Hide Order
  18. Sub Buttons Click Listener
  19. Animation Listener
  20. Click Effects
  21. Sub Button Texts Color
  22. Dim Types
  23. Shadow of Sub Buttons and Boom Button
  24. Get States and Dismiss
  25. Get Sub Views of Sub Button

Versions
Todo
License

Gradle and Maven

Just add the "compile 'com.nightonke:BoomMenu:1.0.9'" in your build.gradle of your module.

dependencies {
    ...
    compile 'com.nightonke:boommenu:1.0.9'
    ...
}

Or maven:

<dependency>
  <groupId>com.nightonke</groupId>
  <artifactId>boommenu</artifactId>
  <version>1.0.9</version>
  <type>pom</type>
</dependency>

Note

  1. I use the ShadowLayout from dmytrodanylyk-ShadowLayout to create the shadow effect of the buttons.
  2. Boom menu button can be used in list since version 1.0.4.

Demo

You can check most of the options that you can set when using boom menu button in this demo. When you read the code of the demo, don't be afraid of the length of the code in MainActivity.class. Most of codes are for the logic of the RadioGroups.
Boom V1.0.9
Or by link:
Boom V1.0.9 in Github
Boom V1.0.9 in Fir

Usage

Easy to Use in 3 Steps

Check the code in EaseUseActivity and you will found out all to do are 3 steps:

1.Add BoomMenuButton in xml file:

<com.nightonke.boommenu.BoomMenuButton
    android:id="@+id/boom"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentEnd="true"
    android:layout_margin="20dp"
    app:boom_inActionBar="false"
    app:boom_button_color="@color/colorPrimary"
    app:boom_button_pressed_color="@color/colorPrimary"
    />

2.Get the view in xml in onCreate() method:

boomMenuButton = (BoomMenuButton)findViewById(R.id.boom);

3.Initialize the boom menu button in the onWindowFocusChanged() method in activity:

@Override
public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);

    boomMenuButton.init(
            subButtonDrawables, // The drawables of images of sub buttons. Can not be null.
            subButtonTexts,     // The texts of sub buttons, ok to be null.
            subButtonColors,    // The colors of sub buttons, including pressed-state and normal-state.
            ButtonType.HAM,     // The button type.
            BoomType.PARABOLA,  // The boom type.
            PlaceType.HAM_3_1,  // The place type.
            null,               // Ease type to move the sub buttons when showing.
            null,               // Ease type to scale the sub buttons when showing.
            null,               // Ease type to rotate the sub buttons when showing.
            null,               // Ease type to move the sub buttons when dismissing.
            null,               // Ease type to scale the sub buttons when dismissing.
            null,               // Ease type to rotate the sub buttons when dismissing.
            null                // Rotation degree.
    ); 
}

Use in Action Bar

To add boom menu button in action bar just:

1.Create your own action bar layout, custom_actionbar.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="@color/transparent">

    <com.nightonke.boommenu.BoomMenuButton
        android:id="@+id/boom"
        android:layout_width="56dp"
        android:layout_height="match_parent"
        android:layout_alignParentStart="true"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true"
        android:background="?android:actionBarItemBackground"
        app:boom_inActionBar="true"
        />

    <TextView
        android:id="@+id/title_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:textAllCaps="true"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textColor="#fff"
        android:layout_toRightOf="@+id/boom"
        android:layout_toEndOf="@+id/boom"
        />

</RelativeLayout>

2.Custom the default action bar in onCreate() method:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ActionBar mActionBar = getSupportActionBar();
    mActionBar.setDisplayShowHomeEnabled(false);
    mActionBar.setDisplayShowTitleEnabled(false);
    LayoutInflater mInflater = LayoutInflater.from(this);

    mCustomView = mInflater.inflate(R.layout.custom_actionbar, null);
    TextView mTitleTextView = (TextView) mCustomView.findViewById(R.id.title_text);
    mTitleTextView.setText(R.string.app_name);

    boomMenuButtonInActionBar = (BoomMenuButton) mCustomView.findViewById(R.id.boom);
    boomMenuButtonInActionBar.setOnSubButtonClickListener(this);
    boomMenuButtonInActionBar.setAnimatorListener(this);

    mActionBar.setCustomView(mCustomView);
    mActionBar.setDisplayShowCustomEnabled(true);

    ((Toolbar) mCustomView.getParent()).setContentInsetsAbsolute(0,0);
}

3.Initialize the boom menu button in the onWindowFocusChanged() method in activity. Just like what we do in the step3 in Easy to Use in 3 Steps

Use in Floating Action Button

Similar with above. But just add some params in xml:

<com.nightonke.boommenu.BoomMenuButton
    android:id="@+id/boom"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:boom_inActionBar="false"
    app:boom_button_color="@color/colorPrimary"
    app:boom_button_pressed_color="@color/colorPrimary"
    />
Param Type What It Does
app:boom_inActionBar boolean true for boom menu button in action bar
app:boom_inList boolean true for boom menu button in list
app:boom_button_color color the color of the boom menu button, only work in floating action button
app:boom_button_pressed_color color the color when pressing the boom menu button, only work when the ClickEffect is normal

Use in List

To add boom menu button in list just:

1.Create your list-item layout, notice that the app:boom_inList value should be true:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:id="@+id/text_view"
        android:layout_width="0dp"
        android:layout_height="56dp"
        android:layout_weight="1"
        android:layout_marginStart="15dp"
        android:layout_marginLeft="15dp"
        android:gravity="center_vertical"
        />

    <com.nightonke.boommenu.BoomMenuButton
        android:id="@+id/boom_circle"
        android:layout_width="56dp"
        android:layout_height="match_parent"
        app:boom_inList="true"
        />

    <com.nightonke.boommenu.BoomMenuButton
        android:id="@+id/boom_ham"
        android:layout_width="56dp"
        android:layout_height="match_parent"
        app:boom_inList="true"
        />

</LinearLayout>

2.Init the boom menu button with delays in adapter: ```java @Override public View getView(int position, View convertView, final ViewGroup parent) {

...

viewHolder.circleBoomMenuButton.postDelayed(new Runnable() {
    @Override
    public void run() {
        viewHolder.circleBoomMenuButton.init(
                circleSubButtonDrawables, // The drawables of images of sub buttons. Can not be null.
                circleSubButtonTexts,     // The texts of sub buttons, ok to be null.
                subButtonColors,          // The colors of sub buttons, including pressed-state and normal-state.
                ButtonType.CIRCLE,        // The button type.
                BoomType.PARABOLA,        // The boom type.
                PlaceType.CIRCLE_3_1,     // The place type.
                null,                     // Ease type to move the sub buttons when showing.
                null,                     // Ease type to scale the sub buttons when showing.
                null,                     // Ease type to rotate the sub buttons when showing.
                null,                     // Ease type to move the sub buttons when dismissing.
                null,                     // Ease type to scale the sub buttons when dismissing.
                null,                     // Ease type to rotate the sub buttons when dismissing.
                null                      // Rotation degree.
        );
        viewHolder.hamBoomMenuButton.setSubButt

Extension points exported contracts — how you extend this code

OnBoomListener (Interface)
Created by Weiping Huang at 00:25 on 16/11/18 For Personal Open Source Contact me at 2584541288@qq.com or nightonke@outl [3 …
boommenu/src/main/java/com/nightonke/boommenu/OnBoomListener.java
InnerOnBoomButtonClickListener (Interface)
Created by Weiping Huang at 01:26 on 16/11/18 For Personal Open Source Contact me at 2584541288@qq.com or nightonke@outl [2 …
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/InnerOnBoomButtonClickListener.java
OnBMClickListener (Interface)
Created by Weiping Huang at 01:26 on 16/11/18 For Personal Open Source Contact me at 2584541288@qq.com or nightonke@outl [1 …
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/OnBMClickListener.java

Core symbols most depended-on inside this repo

point
called by 434
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/ButtonPlaceManager.java
point
called by 212
boommenu/src/main/java/com/nightonke/boommenu/Piece/PiecePlaceManager.java
dp2px
called by 54
boommenu/src/main/java/com/nightonke/boommenu/Util.java
button
called by 45
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/BoomButtonBuilder.java
getPiecePlaceEnum
called by 43
boommenu/src/main/java/com/nightonke/boommenu/BoomMenuButton.java
setText
called by 36
boommenu/src/main/java/com/nightonke/boommenu/Util.java
pieceNumber
called by 35
boommenu/src/main/java/com/nightonke/boommenu/Piece/PiecePlaceEnum.java
addBuilder
called by 31
app/src/main/java/com/nightonke/boommenusample/ListenerActivity.java

Shape

Method 710
Class 63
Enum 8
Interface 3

Languages

Java100%

Modules by API surface

boommenu/src/main/java/com/nightonke/boommenu/BoomMenuButton.java225 symbols
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/BoomButton.java65 symbols
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/HamButton.java43 symbols
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/BoomButtonBuilder.java34 symbols
boommenu/src/main/java/com/nightonke/boommenu/Util.java28 symbols
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/TextOutsideCircleButton.java27 symbols
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/TextInsideCircleButton.java22 symbols
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/SimpleCircleButton.java21 symbols
boommenu/src/main/java/com/nightonke/boommenu/BoomButtons/BoomButtonWithTextBuilder.java20 symbols
app/src/main/java/com/nightonke/boommenusample/BuilderManager.java17 symbols
boommenu/src/main/java/com/nightonke/boommenu/BMBShadow.java14 symbols
boommenu/src/main/java/com/nightonke/boommenu/Animation/Ease.java14 symbols

For agents

$ claude mcp add BoomMenu \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact