rjsvieira / floatingMenu

An orbit-like action button
Apache License 2.0
305 stars 42 forks source link

hope it can dynamic add sub menu #6

Closed Nstd closed 7 years ago

Nstd commented 7 years ago

when i use floatingMenuButton.addView(..) to add sub menu, it display strange

rjsvieira commented 7 years ago

Hello @Nstd Can you please show me the snippet of code where you're adding the Button?

Regards,

rjsvieira commented 7 years ago

Hello @Nstd Regardless of how you're doing it, I've added a new method for you to add FloatingSubButtons programmatically. It can be found on the Read.ME file.

You can add a FloatingSubButton programmatically using the following lines of code.

FloatingSubButton floatingSubButton = new FloatingSubButton(this); // create the button floatingSubButton.setBackground(getDrawable(R.drawable.four)); // specify a custom background And add it to the parent FloatingButton by either specifying layout parameters or assuming default parameters (as default, the layoutParameters for the first button on the list will be considered)

floatingButton.addFloatingSubButton(floatingSubButton, customLayoutParameters); or

floatingButton.addFloatingSubButton(floatingSubButton);

_

Regards,

RVieira :)

Nstd commented 7 years ago

thanks