Closed hiramcastrod closed 6 years ago
Hello @hiramcastrod
That feature is already implemented. You can simple use findViewById() to get the subButton you want and proceed to set a clickListener on it.
Regards,
Hello @rjsvieira , have you ever implemented inside a fragment? it seems like is not working, Null pointer exception error appears, i tried validate it inside "if(FloatingMenu.isOpen())" and a try/catch(nullpointerException)" but nothing happends
i get this error when i put the code inside a FloatingMenu Clicklistener : E/rjsv.floatingmenu.floatingmenubutton.FloatingMenuButton: Attempt to invoke virtual method 'android.view.View rjsv.floatingmenu.floatingmenubutton.subbutton.FloatingSubButton.findViewById(int)' on a null object reference... even if i reference the floatingSubButtons there
Hello @hiramcastrod Yes, I have implemented in both activities and fragments and worked in both situations. The null pointer exception indicates that somehow you are not being able to identify the view through "findViewById()". That or the view could be being null'ed before reaching the setOnClickListener. Can you share that part of code so I can help you debug it? Regards,
Hi can you add to the sample a ClickListener for the FloatingSubButtons please?