|
|
|
You can get the children views of a boom button by the following codes:
|
|
|
|
```
|
|
|
|
BoomButton boomButton = bmb.getBoomButton(i);
|
|
|
|
if (boomButton == null) continue;
|
|
|
|
ImageView image = boomButton.getImageView();
|
|
|
|
if (image != null) image.setImageResource(BuilderManager.getImageResource());
|
|
|
|
TextView text = boomButton.getTextView();
|
|
|
|
if (text != null) text.setText("I'm changed!");
|
|
|
|
TextView subText = boomButton.getSubTextView();
|
|
|
|
if (subText != null) subText.setText("I'm changed, too!");
|
|
|
|
```
|
|
|
|
Notice that the children views and the boom button itself maybe null because boom buttons are cleared in some situation(in list, in fragment, etc.). So you have to check whether they are available. Check the [demo](https://github.com/Nightonke/BoomMenu/blob/master/app/src/main/java/com/nightonke/boommenusample/ChangeBoomButtonActivity.java) for more details. |
|
|
|
\ No newline at end of file |