Adding and removing floating action button into a specific tab

13 views
Skip to first unread message

mjm...@student.maseno.ac.ke

unread,
Jan 17, 2018, 7:19:06 AM1/17/18
to CodenameOne Discussions
hello guys,
how do you add floating action button to a tab such that each tab has its on floating action button.  have tried tab selection listener and don't seem to work for me.


If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device

Shai Almog

unread,
Jan 17, 2018, 11:50:27 PM1/17/18
to CodenameOne Discussions
Hi,
I suggest using the bind API that wraps a Container. That way you bind a Fab to the Container within the Tab before adding it.

E.g.

Container myNewTabContainer = myFab.bindFabToContainer(myTabContainer);
tabs
.addTab("My Tab Name", myNewTabContainer);

Muoka justus

unread,
Jan 18, 2018, 8:49:02 AM1/18/18
to codenameone...@googlegroups.com
Wow, worked perfectly. Thanks Shai Almog

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/Cd8ZlRFvVGU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/f33d970e-548a-420b-be3c-6399f7df2e9a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Justus Muoka
Senior Software Engineer.  Contact: 0711389548
Sematime-Shule yangu mkononi
Reply all
Reply to author
Forward
0 new messages