简体   繁体   English

LWUIT列表项

[英]LWUIT list items

我需要添加高度不相等的列表组件,有没有办法让它工作?

Different cell heights within a list are not supported by LWUIT. LWUIT不支持列表中不同的像元高度。 The list takes care and resizes all cells to the size of the largest one. 该列表会谨慎处理,并将所有单元格的大小调整为最大单元格的大小。 Thought about different renderers (eg fisheye renderer link ) for different components if you need to alter , even thought the cell height stays the same for the whole list. 如果需要更改,请考虑为不同的组件使用不同的渲染器(例如fisheye渲染器链接 ),甚至认为整个列表的像元高度保持不变。

You can use your component which extends from container and add those components in a Container which has BoxLayout.Y axis as its layout so that all the list items will have height according to the text that you added. 您可以使用从容器延伸的组件,并将这些组件添加到以BoxLayout.Y轴为布局的容器中,以便所有列表项都根据您添加的文本具有高度。 How many items do you want to add? 您要添加多少个项目?

使用ContainerList类,它是LWUIT 1.5和Codename One的一部分

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM