list的onloadmore在Android上面不能触发

在list中使用onloadmore方法,loadmoreoffset设成0,在iOS中该方法,可以顺利触发,但是在Android中无法触发,有没有遇到过类似问题的童鞋,分享一下经验,有的人用却说可以。。。

<list style='width: 750; height: {{colHeight}}; background-color: #f4f4f4;' onloadmore='onloadmore' loadmoreoffset=0>
  <refresh onrefresh='refresh' display="{{refreshing ? 'show' : 'hide'}}" style='flex-direction: row; justify-content: center; align-items: center; width: 750; height: 100;'>
    <text style='font-size: 28;'>松开马上为您刷新</text>
    <loading-indicator style='width: 70; height: 70; color: #a9a9a9; margin-left: 24;'></loading-indicator>
  </refresh>

  <cell scope='goods' repeat="{{item in searchResults}}" style='width: 750; height: 515;'>
    <two-goods goods="{{ item }}"></two-goods>
  </cell>

  <cell style='width: 750; height: 24;'></cell>

</list>

原因&解决

在Android sdk中,找到loadmore事件触发的方法,发现当loadmoreoffset=0时,不会触发方法, 我用的是0.11.0-rc0版本的SDK,

我把loadmore设成1就可以触发了。

clipboard.png

阅读 4.3k
1 个回答

官方文档上用的是loadmore事件,不是onloadmore,前者我在android和iOS上是正常使用的,请试试

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进