Some of our how do I videos are so old it’s embarrassing… This is especially true for some core concepts videos as they were some of the first ones we made. The worst part is that these are probably the most important videos we have as they are viewed by developers completely new to Codename One. We had two videos covering creations of lists and both of them used com.codename1.ui.List
with the old GUI builder!
That’s embarrassing… Especially considering this.
So I’ve created a new video that’s more up to date. I discuss lists as a concept but I really describe box layout Y and the InfiniteContainer
class. It’s a big improvement over the old videos.
7 Comments
Hi Shai, thanks for this. Is it possible on the list created using the above method to have LongPress detection capability? If not, how can this be added to the list items of the list itself?
Hi,
sure. You can add any component to the “list” and you can subclass any component to override longPointerPress
Thank Shai, one more question on lists.
After scrolling and pressing an item that navigates you away from a list(e.g. to another form or page), how do you get back to a list to previously displayed list? In my case, the form usually in another class. Is it achievable and what can I do to my code to add this “remember last position” feature onto a list? The use case is when you have a long list and you need to go back and forth without having to keep scrolling from the top to get back to where you had last clicked.
If the same form instance is used when you get back it should still be scrolled to that same position. If not you can just call requestFocus() in the show listener event.
It’s useful. Thank you. For my better understanding, I would ask to you the transcript and the code, like in the Codename One Academy lessons… or, can you add this video to the Academy, so I can access to the transcript and to the source code?
Thank you.
Thanks. All of my new videos on youtube have subtitles which you can turn on using the CC button. You can also see the full transcript of this and other videos in the how do I page for each of them here [https://www.codenameone.com…](https://www.codenameone.com/how-do-i.html)
Really good explanation. Thanks Shai, one thing I appreciate of your explanations is the fact that you consider the way to improve also the way to get things look nice, always at the programmer point of view.