使用Dojo在Worklight中自定义ListView [英] Custom ListView in Worklight using Dojo
问题描述
我正在开展一个Worklight项目,我正在尝试使用自定义列表视图。我使用Dojo工具包实现它,但并不符合我的期望。关于设计我很混乱这是我的代码:
I am working on a Worklight project, and I am trying to use custom listview. I use the Dojo toolkit to implement it, but it's not coming up to my expectations. Regarding design I am confuse. Here is my code:
<div id="bookmarks" data-dojo-type="dojox.mobile.ScrollableView">
<h1 data-dojo-type="dojox/mobile/Heading">Some Heading</h1>
<ul data-dojo-type="dojox.mobile.RoundRectList">
<li data-dojo-type="dojox.mobile.ListItem" data-dojo-props="label:'Item'"><button
data-dojo-type="dojox.mobile.ToggleButton">Label</button></li>
</ul>
</div>
我想要这种类型的listView,其中包括每个列表项中的图像标签,图标标签和复选框
I want this type of listView which include image tag, icon tag and a checkbox in each list item
推荐答案
查看ListItems上的Dojo文档,了解如何添加内置选项(如图标)的示例。
Check out the Dojo documentation on ListItems for examples of adding built in options like icons.
dojotoolkit。 org / reference-guide / 1.8 / dojox / mobile / ListItem.html#dojox-mobile-listitem
dojotoolkit.org/reference-guide/1.8/dojox/mobile/ListItem.html#dojox-mobile-listitem
对于更复杂的布局,如较大的标题,标题和时间戳记,您可以使用跨标签和CSS。
For more complex layout, such as the larger title, small sub-title, and timestamp, you can use span tags and css.
这篇关于使用Dojo在Worklight中自定义ListView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!