2

is it possible to implement an alphabetical scroll bar for a very long list, like the example in link below, in dojox mobile?

4

2 回答 2

0

There is no easy way to customize the scrollbar of a ScrollableView, to do that you would have to override and modify the showScrollBar method (and more specifically its createbar internal function) defined in dojox/mobile/scrollable.js.

于 2013-04-29T15:47:26.660 回答
0

应该可以使用以下可用的构建块来实现它:

  • 列表中的水平字母分隔符:可以使用 ListItem ( doc ) 的 "header" 参数实现为类别标题。
  • SearchBox (1.8+, doc ):用于输入搜索条件的小部件(如屏幕截图顶部的那个)。
  • FilteredListMixin (1.9+; doc , live sample ): 将列表小部件与 SearchBox 组合和连接
  • LongListMixin (1.9+, doc , live sample ): 大大提高了长列表的滚动性能。
  • 列表小部件可以选择由使用 EdgeToEdgeStoreList ( doclive sample ) 的 dojo/store ( doc ) 支持。
  • 垂直字母索引(在屏幕截图的右侧):您需要实现它,例如作为覆盖列表并使用透明填充颜色的容器(在手机上)或在其右侧(在平板电脑上),以及对每个字母使用例如 ToolBarButton ( doc )。当用户触摸给定字母时,按钮字母的动作将依赖 scrollable.scrollIntoView(listItem) ( doc ) 来实现自动滚动。

希望这会有所帮助,阿德里安

于 2013-04-30T08:13:16.343 回答