How do you change the background image of the boom menu button that makes the other buttons popup
ShelmieDesigns opened this issue · 3 comments
I want to change it from the default little circles or boxes to another image
did anyone get a chance to figure this out?
To change the color of the BoomMenu:
Via XML:
app:bmb_normalColor="#0033cc"
Via Java code:
BoomMenuButton bmb = (BoomMenuButton) findViewById(R.id.bmb); bmb.setNormalColor(Color.parseColor("#0033cc"));
Just replace the Hex Color code with the one you want, or instead of parsing you can use one of the color constants available in Android (like Color.RED, Color.BLUE etc.).
Don't forget to import android.graphics.Color;
EDIT
I just realized you were asking how to change the background image, not color. Sorry about that.
Anyway a quick and dirty way would be:
- set bmb width and height
- add background
- set background color alpha to 0
- set shadow color alpha 0 (or disable shadow effect)
Via XML:
<com.nightonke.boommenu.BoomMenuButton
android:id="@+id/bmb"
android:layout_width="72dp"
android:layout_height="72dp"
android:background="@drawable/rombus_quote"
app:bmb_normalColor="#00ffffff"
app:bmb_shadowColor="#00ffffff" />
where drawable/rombus_quote is the 128x128 png I've used, replace with your own image
Or set width, height, background in XML and the rest in Java:
// find the BMB
BoomMenuButton bmb = (BoomMenuButton) findViewById(R.id.bmb);
//set background color of the BMB, alpha is #00 ergo fully transparent
bmb.setNormalColor(Color.parseColor("#00ffffff"));
// set shadow color of the BMB, alpha is #00 ergo fully transparent
bmb.setShadowColor((Color.parseColor("#00ffffff")));
// or instead of changing the shadow color to fully transparent, disable the effect
bmb.setShadowEffect(false);