Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16837] TiAPI: Add property to support Inverted ListView (similar to Skype)

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.2
Fix Version/sn/a
ComponentsTiAPI
Labelsn/a
ReporterLev
AssigneeUnknown
Created2014-04-04T10:21:07.000+0000
Updated2018-02-28T20:04:11.000+0000

Description

Comments

  1. Ritu Agrawal 2014-04-08

    Please take a look at TIMOB-16244 and let us know if that would suffice for your use case.
  2. Lev 2014-04-08

    Having scroll in listview would help me to trigger LoadMore, but still one problem remains - with appending/deleting items from list. When I scroll up and LoadMore is triggered, I add some items to the top. Here the problem is that after items are added, list automatically jumps to the top of block I've added (i.e. scroll position remains constant, relatively to top). Then I need to scroll back down (scrollToItem). That jumping looks weird though.
  3. Ritu Agrawal 2014-04-09

    If you use InsertItemAt() method to add the item to the end of the ListView (similar to Skype) then the list should not jump to the top. Do you have a test case to demonstrate this issue?
  4. Lev 2014-04-09

    Anything what adds/removes items/sections from list could work in 2 different ways - remain scroll position of count from Top, or from Bottom (or somewhere in the middle - also possible). Now it's always Top. Here's code:
       listSections = getListSections(); // sections, which I'm going to add to the top of the list, total height is about 2000
       _lv.insertSectionAt(0, listSections, {animated: false}); // when I do that, the top item I see is the one which is section == 0, index == 0. However as my list grows from bottom to top, I expect to stay at the same position, not to miss anything what was added
       // To compensate that, I scroll it back down
       _lv.scrollToItem(listSections.length, 0, {animated: false}); 
       
    This results in "jumping". Another issue is that until you apply setTimeout to scrollToItem, sections will not be added correctly (that results in a lot of empty space in the bottom of list)
       setTimeout(function() {_lv.scrollToItem(listSections.length, 0, {animated: false}); }, 0);
       
    However on device (iPhone 4) it could work buggy also. Maybe create another issue for that.
  5. Ritu Agrawal 2014-04-10

    Moving this improvement request to engineering for further evaluation and prioritization.
  6. Jeff Antram 2014-05-13

    This feature would be very useful for our app - we have implemented 2 "iMessage" style pages. Just to add to this, the documented Android bug that stops "scroll to item" working makes it impossible to add a new item and guarantee that it has been scrolled into view. http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.UI.ListView-method-scrollToItem "On Android 4.x, the list does not stop at the correct position. This is a known bug in Android. (Android Issue #37278)"

JSON Source