Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26656] Ti.UI.View: Add "insertViewsAt()" method

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.2
Fix Version/sn/a
ComponentsAndroid, iOS
Labelsinsert, view
ReporterHans Knöchel
AssigneeUnknown
Created2018-12-14T13:12:23.000+0000
Updated2018-12-14T13:16:22.000+0000

Description

(Cloned from the scrollable-view ticket) The Ti.UI.View currently supports the ".add()" method to programmatically append additional views to the end of the collection. However, it has no method to insert one or more views at the beginning (prepend), or somewhere in the middle of the collection. It would be great to have a method like ".insertViewsAt(idx, views)" so one item (or more) can be prepended or inserted at specific locations without requiring the entire views collection to be re-bound and rendered.

Comments

  1. Hans Knöchel 2018-12-14

    PoC: https://github.com/hansemannn/titanium_mobile/commit/0db641aad8a905f0081fcaf858c5afa1452dbe59

JSON Source