Hi,
I have some questions about using lists in codename. I have List with my own ListModel (which implements com.codename1.ui.list.ListModel) and with own renderer (which extends Container and implements ListCellRenderer). Now one of the elements in that list is an button. It works fine but it doesn't change style when clicked. I should also mention that I didn't override any style it is all derived from default one. So my questions are:
1. How could I make that button change style when clicked? I tried to set its UIID but it seems it still do not work and also it leads me to my next question:
2. When I set UIID on component it seems that I have to define all of its style from scratch. Is there a way to change let say only foreground color and inherit every other aspect of the style from default style?
3. My list will be pretty big so I do not want to load all of its elements first time. Right now my whole list is saved to the FileSystemStorage via protostuff method ProtostuffIOUtil.writeListTo() and load via ProtostuffIOUtil.parseListFrom. So first of all I do not want to read and write all of my list every time from/to FileSystemStorage. Next if I have some reasonable small portion of list I would like to auto fetch it while let say user will scroll it. Is this possible with some codename one component or do I have to write it from scratch. Or maybe there is some better way to achieve this?
4. My list model among simple fields will contain images and videos . So also I would like to load them only when user click on the item and go to the details view. Is there some way to lazy load elements like that. What would be Your recomendation?
5. Another thing is that my list will contain some sensitive data. So I would like to encode it before saving to FileSystemStorage and decode it only while it is used (same thing like in previous question it could be lazy loaded and decoded only when user really need it and encode back when user go back to the list view). BouncyCastle is my library of choice here but what would be the best storage type for encrypted data?
I know these are big questions but I really want to get some tips and ideas how it could be implemented.
Best regards.