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)