简体   繁体   English

CodeNameOne列表组件ListItems中的有效键是什么?

[英]What are the valid keys in CodeNameOne List Component ListItems?

What are the valid keys in CodeNameOne List Component's ListItems? CodeNameOne列表组件的ListItems中的有效键是什么?

In the CodeNameOne GUI builder, you can set keys for each item in a list. 在CodeNameOne GUI构建器中,可以为列表中的每个项目设置键。 The default behavior is that certain keys will cause additional behaviors, like showing icons or navigation. 默认行为是某些键会导致其他行为,例如显示图标或导航。 However, I can't seem to find any documentation for what the recognized keys are. 但是,我似乎找不到任何有关可识别键的文档。

I know of $navigation, destination, and icon, but are there anymore keys that the default renderer and controller can use? 我知道$ navigation,destination和icon,但是是否还有默认渲染器和控制器可以使用的键?

Here are two sources: 这里有两个来源:

http://www.codenameone.com/3/post/2013/12/deeper-in-the-renderer.html http://www.codenameone.com/3/post/2013/12/deeper-in-the-renderer.html

http://www.codenameone.com/how-do-i---create-a-list-of-items-the-hard-way-gui-builder-renderer.html http://www.codenameone.com/how-do-i---create-a-list-of-items-the-hard-way-gui-builder-renderer.html

If you use the MultiList then you can determine the "name" of the elements on the MultiList which will map directly to the keys in the entry. 如果使用MultiList则可以确定MultiList上元素的“名称”,这些元素将直接映射到条目中的键。 If you use a List then the renderer will use the names of the components within the renderer container as the values for the keys. 如果使用列表,则渲染器将使用渲染器容器中组件的名称作为键的值。 I suggest reading deeper in the renderer where I discuss some interesting special cases and edge cases. 我建议深入阅读渲染器 ,在其中讨论一些有趣的特殊情况和边缘情况。

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

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