[TIMOB-14496] Android: setHeaderView for Titanium.UI.TableViewSection
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-12-01T23:58:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 4.0.0 |
Components | Android |
Labels | android, docs, headerview, tableviewsection |
Reporter | Manuel Lehner |
Assignee | Hieu Pham |
Created | 2013-07-08T19:54:39.000+0000 |
Updated | 2015-03-12T17:34:57.000+0000 |
Description
Currently, it is only possible to set the *headerView* of a TableViewSection at creation-time in Android.
It would be great to use the *setHeaderView* method for Android too. In the Docs there is no note that this method is not available in Android: [http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableViewSection-method-setHeaderView].
There is only a hint at the *headerView* property description (_"On Android, must be set at creation."_): [http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableViewSection-property-headerView]
Q&A: [http://developer.appcelerator.com/question/154498/alloy-how-to-set-controller-as-headerview-to-tableviewsection-in-android]
Here is a simple test case:
PR: https://github.com/appcelerator/titanium_mobile/pull/5619
I can't edit the issue. Type should be Bug. Can this bugfix be reviewed?
Thank you for the PR. We will review it shortly. Since you are adding functionality, it isn't a bug, but an improvement. I've marked it as such. Thanks!
Thanks, Ingo. But isn't this a bug? (since *setHeaderView* is a documented method)
Maybe I missed to add expected and actual result in the description. But I added a test case as comment to reproduce the bug. And since my PR actually fixes the bug it isn't really an improvement, isn't it? It simply adds the missing property accessors to give the expected result for the above test case.
Verified fixed using: Titanium SDK 4.0.0.v20150312092612 Studio 4.0.0.201503062102 CLI 3.4.2 Xcode 6.2 Node 0.12 setHeaderView called without error.