[ALOY-464] Alloy - HeaderView element not working for TableViewSection
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2013-01-29T21:36:44.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.1.0, 2013 Sprint 03 |
Components | Runtime, XML |
Labels | alloy |
Reporter | Daniel Sefton |
Assignee | Unknown |
Created | 2013-01-11T13:02:30.000+0000 |
Updated | 2018-03-07T22:26:03.000+0000 |
Description
See discussion: https://groups.google.com/forum/#!topic/appc-ti-alloy/rW8FFb7IxOg Hi, it is not possible to add a headerView to a TableViewSection like a headerView to a TableView. Markup:Comments
- Tony Lukasavage 2013-01-29 example in test app: https://github.com/appcelerator/alloy/tree/master/test/apps/ui/proxy_properties
- Hazem Khaled 2013-02-26
The example give me same bug when add
into - Tony Lukasavage 2013-02-26 Are you using the right version of Alloy? As noted in the fix version of this ticket it requires Alloy 1.0.0.
- Hazem Khaled 2013-02-26 alloy -v 1.0.0 SDK 3.0.2.GA
- Jick Steen 2013-02-26 It's not working for me too. Getting the following message with Alloy 1.0.0 + SDK 3.0.2.GA "Parent element must one of the following: [Ti.UI.TableView]"
- Tony Lukasavage 2013-02-26 Apologies guys, i had it labeled with the wrong fix version. This was actually the very first thing I worked on when 1.1.0 work started. So this will be available in 1.1.0, and is already available in the github repository.
- Hazem Khaled 2013-02-26 Worked with Alloy 1.1.0 Thanks Tony :)
- Stefan Moonen 2013-03-12 Tony, when I tested your addition (I pulled it from Github) I noticed the HeaderView doesn't get added to the TableView on creation. This causes issues on Android since HeaderView is a "Creation Only" property of TableViewSection. Is there another issue that already covers the way this works? I couldn't find it, but that's why I haven't created a new issue (yet).
- Tony Lukasavage 2013-03-12
- Alejandro Del Rio Albrechet 2013-03-25 It that problem with android were fixed?
- Tony Lukasavage 2013-03-25 Could you elaborate on the problem... Also, have you checked TIMOB-11232 listed in the comment directly preceding your's? Does that account for your situation?
- Stefan Moonen 2013-03-25 My guess would be he's running into the same problem where the headerView isn't added on creation. So HeaderViews set in an Alloy template won't work on Android.
- Alejandro Del Rio Albrechet 2013-03-25
Yes I think that is my problem. I have created a markup :
then in tss file define to rules : ".sectionHeaderView[platform=android]" : { width: Ti.UI.FILL , height: "25dp" , backgroundColor: "#7d820c" } , ".headerViewLabel[platform=android]" : { left: "5dp" , height: "25dp" , textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT , font: { fontSize: "15dp" , fontWeight: "bold" } , color: "#fff" , width: Ti.UI.FILL } , ".sectionHeaderView" : { height: "30dp" , font: { fontSize: "14dp" } , width: Ti.UI.FILL } , ".headerViewLabel" : { textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER , font: { fontSize: "20dp" , fontWeight : "bold" } , width: Ti.UI.FILL , color: "#4169E1" } And for IOS it works but on android it just shows table with out any tableviewsections. :-( - Alejandro Del Rio Albrechet 2013-03-25 If that will be fixed in future releases? And maybe you know what is the ticket issue number for it?
- Tony Lukasavage 2013-03-25 TIMOB-11232 is the root of the issue. I would watch that ticket and comment there to let the engineers this is an important issue.
- Shyam Bhadauria 2013-05-14 Though no error is being displayed on building alloy app with headerview element,header and footer for tableview section are still not visible.So cannot close the bug as TIMOB-11232 is still open.
- Tony Lukasavage 2013-05-14 [~sbhadauria] Alloy's implementation is not contingent on whether or not the underlying platforms all work as expected. When TIMOB-11232, which is the actually issue being reported here, is resolved, then the header and footer will appear in tableview sections. This ticket was opened for implementation of the feature in alloy, not to address the bug in TIMOB-11232.
- David Benko 2013-09-02 Still not working in Alloy 1.2.1 SDK 3.1.2. Alloy does like this: $.__views.__alloyId154.headerView = $.__views.__alloyId157; Setting the headerView property on the TableViewSection after the creation doesn't work, instead we need to create the section and pass the headerView property on its creation. So I guess the only way is to do it on the controller right now.
- Andrew McElroy 2013-12-02
Hey Tony,
Alloy 1.2.2 SDK 3.1.3.GA or 3.2.0.v20131102082008 I am still getting this same error.
This is not resolved.
[DEBUG] [ERROR] Error with
at line 5 [DEBUG] [ERROR] Child element must be one of the following: [Ti.UI.ListSection,Alloy.Abstract.Templates] [DEBUG] [ERROR] Alloy compiler failed I am getting this error via your listview example app in the alloy repo. - Tony Lukasavage 2013-12-03
[~sophrinix] couple things wrong with your report here:
You're reporting an error with ListView when this entire issue is regarding TableView
ListView did not even support
or any other proxy property until 3.2.0, it is brand new. It is in turn supported in Alloy 1.3.0, as noted here: ALOY-843 Use Alloy 1.3.0 and TiSDK 3.2.0 and everything should work fine for ListView, as detailed in this test app: https://github.com/appcelerator/alloy/tree/master/test/apps/ui/lists_proxy_properties