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
  • Share Style

Share Style · Changes

Page history
Updated Share Style (markdown) authored Dec 11, 2016 by Weiping Huang's avatar Weiping Huang
Hide whitespace changes
Inline Side-by-side
Share-Style.md
View page @ 07515809
Make a share-style BMB.
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/share-example.gif">
###Share Style
BMB is able to act as a share-action-button. Check the [demo](https://github.com/Nightonke/BoomMenu/blob/master/app/src/main/java/com/nightonke/boommenusample/ShareActivity.java) for details.
1. Set the piece-place-enum of BMB to share-style.
```
bmb1.setPiecePlaceEnum(PiecePlaceEnum.Share);
```
Or in .xml:
```
app:bmb_piecePlaceEnum="piecePlace_share"
```
2. Add builders.
Notice that the number of builders must in range [3, 9]. And don't try to use `PiecePlaceEnum.Share.pieceNumber()` to make a add-builder-loop, because `PiecePlaceEnum.Share.pieceNumber()` equals -1. You should use `bmb.getButtonPlaceEnum().buttonNumber()`:
```
for (int i = 0; i < bmb.getButtonPlaceEnum().buttonNumber(); i++)
bmb.addBuilder(BuilderManager.getTextInsideCircleButtonBuilder());
```
3. (Optional)Customize your share style BMB.
```
bmb.setShareLineLength(45);
bmb.setShareLineWidth(5);
bmb.setDotRadius(12);
bmb.setShareLine1Color(Color.BLACK);
bmb.setShareLine2Color(Color.BLACK);
```
Or in .xml:
```
app:bmb_sharedLineLength="10dp"
app:bmb_shareLineWidth="2dp"
app:bmb_dotRadius="4dp"
app:bmb_shareLine1Color="@android:color/holo_orange_light"
app:bmb_shareLine2Color="@android:color/holo_orange_dark"
```
\ No newline at end of file
Clone repository

#####Documentation 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. Structure for BMB