-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Share Style
Weiping Huang edited this page Mar 28, 2017
·
3 revisions
Make a share-style BMB.
BMB is able to act as a share-action-button. Check the demo for details.
- Set the piece-place-enum of BMB to share-style.
bmb1.setPiecePlaceEnum(PiecePlaceEnum.Share);
Or in .xml:
app:bmb_piecePlaceEnum="piecePlace_share"
- Add builders.
Notice that the number of builders must in range [3, 9]. And don't try to usePiecePlaceEnum.Share.pieceNumber()
to make a add-builder-loop, becausePiecePlaceEnum.Share.pieceNumber()
equals -1. You should usebmb.getButtonPlaceEnum().buttonNumber()
:
for (int i = 0; i < bmb.getButtonPlaceEnum().buttonNumber(); i++)
bmb.addBuilder(BuilderManager.getTextInsideCircleButtonBuilder());
- (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"
- Basic Usage
- Simple Circle Button
- Text Inside Circle Button
- Text Outside Circle Button
- Ham Button
- Share Style
- Custom Position
- Button Place Alignments
- Different Ways to Boom
- Ease Animations for Buttons
- Different Order for Buttons
- Other Animations Attributes for Buttons
- Click Event and Listener
- Control BMB
- Use BMB in Action Bar
- Use BMB in Tool Bar
- Use BMB in List
- Use BMB in Fragment
- Attributes for BMB or Pieces on BMB
- Cache Optimization & Boom Area
- Change Boom Buttons Dynamically
- Fade Views
- Version History
- Structure for BMB