Multiple Tabs Not Responding

25 views
Skip to first unread message

jerryk...@gmail.com

unread,
Jun 29, 2015, 12:54:30 PM6/29/15
to codenameone...@googlegroups.com
Please I'm new to Codename One. I want to use tabs as my sliding containers for pagination ( Shai Almog suggests it all the time) . It works fine when I use addTabs() for just a few tabs but now I want add about 400 tabs. I tried using for loop in different ways but i'm not getting the desired response. Is there a simpler way of achieving this like the viewPager in android? I will be grateful to get a reply and possibly with codes.

Shai Almog

unread,
Jun 29, 2015, 11:52:37 PM6/29/15
to codenameone...@googlegroups.com, jerryk...@gmail.com
Its not designed for 400 tabs.
What do you want to appear in the tabs? Images?
If so we have the ImageViewer class or List set to horizontal orientation.

Jerry Arekhandia

unread,
Jun 30, 2015, 12:28:19 AM6/30/15
to codenameone...@googlegroups.com, jerryk...@gmail.com
No, not images. I know about the ImageViewer class. I intend displayng rich text in them, so  i made use of the WebBrowser component.
I designed a native Android app for thesame purpose using ViewPager and WebView. It works just fine there.
I dont really think the List class can do that. I'll give it a try anyway but I'll prefer you suggesting (possibly with code ) a way for me to make my codename one app detect left and right swipe so make use of Forms? I've tried several way, still not getting the desired response.

Jerry Arekhandia

unread,
Jun 30, 2015, 6:28:29 AM6/30/15
to codenameone...@googlegroups.com
I've tried List set to horizontal orientation. It doesn't suit my need. I believe Forms can be made to respond to swipe gestures. I'll need your help on that. Please I need your reply.

Shai Almog

unread,
Jun 30, 2015, 10:11:50 AM6/30/15
to codenameone...@googlegroups.com, jerryk...@gmail.com
The best option for that would be to add/remove tabs as you swipe thru them or build your own custom container with swipe logic.

esocs...@gmail.com

unread,
Jun 30, 2015, 10:30:50 AM6/30/15
to codenameone...@googlegroups.com, jerryk...@gmail.com
Ok ill give the tab option a try and get back to you as soon as possible.

Jerry Arekhandia

unread,
Jul 9, 2015, 12:44:27 PM7/9/15
to codenameone...@googlegroups.com, jerryk...@gmail.com


Oh! sorry for the late reply. I was busy with some other stuffs. I'm not a full time programmer. Anyway, I was able to implement swipe gesture for my container by overriding pointer pressed/dragged listeners. It was quite easy. You ought to have given me a tip on that. Nonetheless u r doin a very good job. Thumbs up.
Reply all
Reply to author
Forward
0 new messages