Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4686] ListView: support for subitems OR add support for TableView inside ListItem OR add support for ListView inside ListItem

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusResolved
ResolutionWon't Fix
Resolution Date2016-12-19T20:41:36.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterRicardo Pereira
AssigneeShak Hossain
Created2016-12-19T16:05:45.000+0000
Updated2016-12-19T20:41:36.000+0000

Description

*Description* In order to create an horizontal ListView or TableView, it's necessary to rotate -90º the element, and rotate 90º the ListItem or TableViewRow respectively. This horizontal scroller push results to the beginning and the end of the list, since ListView is better for performance, it was my choice. In android I think this is possible with the *ExpandableListView* *Problem* It's almost impossible to get the sub item reference, I've tried 3 different approaches, I will list here some tests that I've made, and the problems that I've found. If one of these could work, the perfect one would be the first: *1# - ListView inside ListItem OR sub items in each ListItem* Each ListItem Template has a View, according to the received data, it's created an common JS ListView. * There are no way to know the index of the selected ListItem of the inner ListView; * After some scrolls on the main ListView, the data of each ListView changes between ListItems, repeating and reordering inner ListViews inside the main ListItems that were not supposed to have that; [some info at the end of the ticket] *2# - TableView inside ListItem* Each ListItem Template has a TableView, according to the received data, it's created and array of TableViewRows and set as the data of the ListItem table bindId. * There are no way to know the index of the selected TableViewRow; * After some scrolls on the ListView, the data of each TableView changes between ListItems, repeating and reordering TableViewRows inside TableViews that were not supposed to have that; *3# - ScrollView inside ListItem* Each ListItem Template has a ScrollView. *If the ScrollView children were added by the ListItem properties, there is no way to get the reference of the selected View; *If the ScrollView children were created in the ListItem Template (alloy), I need to add a specific number of Views, so, there will be very unused Views inside ScrollViews, and cases that there are no sufficient innser Views to use, but its possible to get the bindId (subitem1, subitem2 ...). [This is the way that I'm using now] *Result* In this print, I was using an inner TableView, but because the repeating and reordering data, the result is the same but with a ScrollView: !https://i.stack.imgur.com/Kplu0.jpg! *Columns/Cells in Tables* I've to show the data in a ListView, but I need to have a specific number os columns/cells, so I've created 12 ListItem Templates, one for each case (with a limit of 12 columns/cells). With this concept of sub items, there will be need just one ListItem Template. Some prints: !tables.jpg|thumbnail!

Attachments

FileDateSize
tables.jpg2016-12-19T16:05:02.000+0000131187

Comments

  1. Hans Knöchel 2016-12-19

    Hey Ricardo, sorry, but this is no feature we will plan to expose. The use-case represents a very non-native behavior and could be realized using a combination of horizontal- and vertical-aligned view (scroll view container with horizontal views, vertical views inside there for the content). Everything else is really bad practise, I hope the explanation makes sense for you. Thx!

JSON Source