The basic structure is pretty much same as in Kaprice.
This is the relevant part of the screen design xml - file:
<scrollcontainer usemarkers="false" style="bg-color:white">
<list>
<_renderer>
<![CDATA[
<listItem onAction="showDetails">
<text>@{lm_name}</text>
</listItem>
]]>
</_renderer>
<_items>@{landmarks}</_items>
</list>
</scrollcontainer>
And this is the code used to initialize and construct the screen:
provider.initialize();
screen = Kuix.loadScreen(CacheBuddyConstants.LANDMARKS_SCREEN, provider);
Where the provider is a instance variable of the Frame - class. Basically this is just like Pad in Kaprice.
The initialize() - method of the provider just uses addItem(LANDMARKS_PROPERTY, landmarkDataProvider) to add the landmark details into the list. But currently the data provider is completely empty. So it doesn't add any items. And it still fails.
The out of memory error also occurs if I call the Kuix.loadScreen - method with null provider. The OutofMemoryError is thrown when I try to display the screen with:
KuixMIDlet.getDefault().getCanvas().getDesktop().setCurrentScreen(screen);
I thought that I had everything done basically the same way that Kaprice does things. But Kaprice works, and mine doesn't. I tried setting the pad data provider in Kaprice to null also, but it still works correctly.. I'm a bit baffled by this..