Author Topic: endless scroll vies sort element problem  (Read 13255 times)

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
endless scroll vies sort element problem
« on: June 23, 2017, 06:31:06 PM »
i see example and see only 9 elements inscroll view, so duplicating this and setting right name like 10,11,12,13 and so on after run the elments are not sorted how i see with 9 element..why? i need they remain sorted like i set.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: endless scroll vies sort element problem
« Reply #1 on: June 27, 2017, 11:48:16 AM »
Sorting is alphabetic, not alphanumeric. You need to add zeroes in front (item01, item02, ... item10, item 11, etc) for them to be sorted as you expect.

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
Re: endless scroll vies sort element problem
« Reply #2 on: June 30, 2017, 09:51:30 AM »
i see this..first of run and after on run.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: endless scroll vies sort element problem
« Reply #3 on: July 06, 2017, 05:45:20 AM »
Oh, the endless scroll views... those just reuse elements. The order of them is not guaranteed -- which is why they have their own index that you can use to set their values correctly. "onInitializeItem" gets called, with the real index being passed as the 3rd element.

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
Re: endless scroll vies sort element problem
« Reply #4 on: July 06, 2017, 08:32:43 PM »
thanks Arenmook