Android menu Boommenu (hover button popup menu)

Source: Internet
Author: User

This article is only used for technical collection specific content please visit GitHub.
Https://github.com/Nightonke/BoomMenu

Boommenu implementation
First, import jar
dependencies {
...
Compile ' com.nightonke:boommenu:x.y.z '
...
}

//x.y.z 为最新jar版本 // https://github.com/Nightonke/BoomMenu

Ii. adding layouts in XML

<
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"
/>

Third, Code logic

Boommenubutton = (Boommenubutton) Findviewbyid (r.id.boom);

@Override
public void Onwindowfocuschanged (Boolean hasfocus) {
Super.onwindowfocuschanged (Hasfocus);

boomMenuButton.init(        subButtonDrawables, // 子按钮图片数组。不能空。        subButtonTexts,     // 子按钮的文本数组,可以为空。        subButtonColors,    // 子按钮的颜色数组,包括按下状态和正常状态。        ButtonType.HAM,     // 按钮类型。        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                

}

Please check the source for detailed parameters of the above attributes
Https://github.com/Nightonke/BoomMenu

Partial parameter Setting Demo Chart display

Android menu Boommenu (hover button popup menu)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.