Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B BoomMenu
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 114
    • Issues 114
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • 黄伟平
  • BoomMenu
  • Wiki
  • Ham Button

Ham Button · Changes

Page history
Updated Ham Button (markdown) authored Mar 28, 2017 by Weiping Huang's avatar Weiping Huang
Hide whitespace changes
Inline Side-by-side
Ham-Button.md
View page @ f11d483b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Add ham buttons with with a title, subtitle and image inside for each to BMB. Add ham buttons with with a title, subtitle and image inside for each to BMB.
###Create BMB ### Create BMB
Add BMB in .xml file. Add BMB in .xml file.
...@@ -18,7 +18,7 @@ Add BMB in .xml file. ...@@ -18,7 +18,7 @@ Add BMB in .xml file.
``` ```
You can set button-enum, piece-place-enum and button-place-enum in .xml file with attributes or in .java file with setters. For more information and pictures about [piece-place-enum](https://github.com/Nightonke/BoomMenu/wiki/Ham-Button#piece-place-enum-for-ham-button) and [button-place-enum](https://github.com/Nightonke/BoomMenu/wiki/Ham-Button#button-place-enum-for-ham-button), check the tables below. You can set button-enum, piece-place-enum and button-place-enum in .xml file with attributes or in .java file with setters. For more information and pictures about [piece-place-enum](https://github.com/Nightonke/BoomMenu/wiki/Ham-Button#piece-place-enum-for-ham-button) and [button-place-enum](https://github.com/Nightonke/BoomMenu/wiki/Ham-Button#button-place-enum-for-ham-button), check the tables below.
###Add Builders ### Add Builders
The builder of ham button has lots of methods to customize the boom-buttons. **Needn't to set every attributes for boom-buttons, just customize what you want.** For example: The builder of ham button has lots of methods to customize the boom-buttons. **Needn't to set every attributes for boom-buttons, just customize what you want.** For example:
``` ```
for (int i = 0; i < bmb.getPiecePlaceEnum().pieceNumber(); i++) { for (int i = 0; i < bmb.getPiecePlaceEnum().pieceNumber(); i++) {
...@@ -247,39 +247,39 @@ After adding builders to BMB, it is ready for a boom. ...@@ -247,39 +247,39 @@ After adding builders to BMB, it is ready for a boom.
All piece-place-enum and button-place-enum can be found in [demo](https://github.com/Nightonke/BoomMenu/blob/master/app/src/main/java/com/nightonke/boommenusample/HamButtonActivity.java). All piece-place-enum and button-place-enum can be found in [demo](https://github.com/Nightonke/BoomMenu/blob/master/app/src/main/java/com/nightonke/boommenusample/HamButtonActivity.java).
1. PiecePlaceEnum.HAM_1(in .java) or bmb_piecePlace_ham_1(in .xml) 1. PiecePlaceEnum.HAM_1(in .java) or bmb_piecePlace_ham_1(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-1.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-1.png" width="100">
2. PiecePlaceEnum.HAM_2(in .java) or bmb_piecePlace_ham_2(in .xml) 2. PiecePlaceEnum.HAM_2(in .java) or bmb_piecePlace_ham_2(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-2.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-2.png" width="100">
3. PiecePlaceEnum.HAM_3(in .java) or bmb_piecePlace_ham_3(in .xml) 3. PiecePlaceEnum.HAM_3(in .java) or bmb_piecePlace_ham_3(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-3.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-3.png" width="100">
4. PiecePlaceEnum.HAM_4(in .java) or bmb_piecePlace_ham_4(in .xml) 4. PiecePlaceEnum.HAM_4(in .java) or bmb_piecePlace_ham_4(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-4.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-4.png" width="100">
5. PiecePlaceEnum.HAM_5(in .java) or bmb_piecePlace_ham_5(in .xml) 5. PiecePlaceEnum.HAM_5(in .java) or bmb_piecePlace_ham_5(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-5.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-5.png" width="100">
6. PiecePlaceEnum.HAM_6(in .java) or bmb_piecePlace_ham_6(in .xml) 6. PiecePlaceEnum.HAM_6(in .java) or bmb_piecePlace_ham_6(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-6.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/piece-place-enum/piece-place-enum-ham-6.png" width="100">
### Button Place Enum for Ham Button ### Button Place Enum for Ham Button
All piece-place-enum and button-place-enum can be found in [demo](https://github.com/Nightonke/BoomMenu/blob/master/app/src/main/java/com/nightonke/boommenusample/HamButtonActivity.java). All piece-place-enum and button-place-enum can be found in [demo](https://github.com/Nightonke/BoomMenu/blob/master/app/src/main/java/com/nightonke/boommenusample/HamButtonActivity.java).
1. ButtonPlaceEnum.HAM_1(in .java) or bmb_buttonPlace_ham_1(in .xml) 1. ButtonPlaceEnum.HAM_1(in .java) or bmb_buttonPlace_ham_1(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-1.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-1.png" width="100">
2. ButtonPlaceEnum.HAM_2(in .java) or bmb_buttonPlace_ham_2(in .xml) 2. ButtonPlaceEnum.HAM_2(in .java) or bmb_buttonPlace_ham_2(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-2.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-2.png" width="100">
3. ButtonPlaceEnum.HAM_3(in .java) or bmb_buttonPlace_ham_3(in .xml) 3. ButtonPlaceEnum.HAM_3(in .java) or bmb_buttonPlace_ham_3(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-3.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-3.png" width="100">
4. ButtonPlaceEnum.HAM_4(in .java) or bmb_buttonPlace_ham_4(in .xml) 4. ButtonPlaceEnum.HAM_4(in .java) or bmb_buttonPlace_ham_4(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-4.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-4.png" width="100">
5. ButtonPlaceEnum.HAM_5(in .java) or bmb_buttonPlace_ham_5(in .xml) 5. ButtonPlaceEnum.HAM_5(in .java) or bmb_buttonPlace_ham_5(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-5.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-5.png" width="100">
6. ButtonPlaceEnum.HAM_6(in .java) or bmb_buttonPlace_ham_6(in .xml) 6. ButtonPlaceEnum.HAM_6(in .java) or bmb_buttonPlace_ham_6(in .xml)
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-6.png" width="100"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/button-place-enum-ham-6.png" width="100">
7. ButtonPlaceEnum.Horizontal(in .java) or bmb_buttonPlace_horizontal(in .xml) 7. ButtonPlaceEnum.Horizontal(in .java) or bmb_buttonPlace_horizontal(in .xml)
ButtonPlaceEnum.Horizontal puts boom-buttons in a horizontal line, notice that `ButtonPlaceEnum.Horizontal.buttonNumber()` returns `Integer.MAX_VALUE`. ButtonPlaceEnum.Horizontal puts boom-buttons in a horizontal line, notice that `ButtonPlaceEnum.Horizontal.buttonNumber()` returns `Integer.MAX_VALUE`.
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/horizontal.png"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/horizontal.png">
8. ButtonPlaceEnum.Vertical(in .java) or bmb_buttonPlace_vertical(in .xml) 8. ButtonPlaceEnum.Vertical(in .java) or bmb_buttonPlace_vertical(in .xml)
ButtonPlaceEnum.Vertical puts boom-buttons in a vertical line, notice that `ButtonPlaceEnum.Vertical.buttonNumber()` returns `Integer.MAX_VALUE`. ButtonPlaceEnum.Vertical puts boom-buttons in a vertical line, notice that `ButtonPlaceEnum.Vertical.buttonNumber()` returns `Integer.MAX_VALUE`.
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/vertical.png"> <img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/ham-button/vertical.png">
### The Special Boom-Button ### The Special Boom-Button
Sometimes we need to add a boom-button with "Cancel" on the last boom-button(the bottom one). And maybe the last one should have a larger top-margin with its above one. Then you can set this special attribute by: Sometimes we need to add a boom-button with "Cancel" on the last boom-button(the bottom one). And maybe the last one should have a larger top-margin with its above one. Then you can set this special attribute by:
......
Clone repository
Chapters
  1. Basic Usage
  2. Simple Circle Button
  3. Text Inside Circle Button
  4. Text Outside Circle Button
  5. Ham Button
  6. Share Style
  7. Button Place Alignments
  8. Different Ways to Boom
  9. Ease Animations for Buttons
  10. Different Order for Buttons
  11. Other Animations Attributes for Buttons
  12. Click Event and Listener
  13. Control BMB
  14. Use BMB in Action Bar
  15. Use BMB in List
  16. Use BMB in Fragment
  17. Attributes for BMB or Pieces on BMB
  18. Cache Optimization & Boom Area
  19. Version History
  20. Structure for BMB