[TIMOB-14543] iOS: Setting ListView height as Ti.UI.SIZE makes ListView disappear
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-06T18:20:28.000+0000 |
Affected Version/s | Release 3.1.1, Release 3.2.0 |
Fix Version/s | Release 3.4.0 |
Components | iOS |
Labels | iOS, module_listview, parity, qe-manualtest, usability |
Reporter | Mark Mokryn |
Assignee | Vishal Duggal |
Created | 2013-07-12T11:55:07.000+0000 |
Updated | 2014-09-09T09:32:44.000+0000 |
Description
*Problem*
In my attempt to get rid of separators for non-full ListViews I tried using Ti.UI.SIZE for the height. This works on Android as far as I can tell, but on iOS the ListView disappears.
*Test case*
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var listView = Ti.UI.createListView({
top : 0,
height : Ti.UI.SIZE //where is my listview??!?!?!?
});
var section = Ti.UI.createListSection({
headerTitle : 'ugly lines'
});
section.setItems([{
properties : {
title : 'Ugly lines on iOS'
}
}]);
listView.sections = [section];
win.add(listView);
win.open();
Tested and confirmed on iOS 6 simulator with Ti SDK 3.1.1 GA and 3.2 CI.
Tested and confirmed on iOS 7.0.3 with Ti SDK 3.2.0.v20131010124846
Same for me, works great on android but on iOS it disapears. Trying to hide the rows/separators if they aren't needed based on dynamic data. No known workarounds. With all the work with listviews recently, hopefully this takes priority and get it polished up! Any eta on this?
Same for me, however the workaround to hide the empty rows is to set the footerTitle property to empty string. i.e., footerTitle: ""
Still an issue in 3.3.0.RC - Really frustrating I can't make a ListView size to its (non-scrollable) contents.
Can someone provide a use case for this? We will attempt to find a solution.
[~ingo] You mean a *why*? Some examples: * Using a non-scrollable ListView in a vertical layout * Using a ListView in a Popover My main use case is the second one. I have a settings popover with a navigation window and a list view in the root window. A click on a row then opens a child window with another list view. The popover should take the size of the list, which is set to non-scrollable. But then it disappears :)
For me it is mostly Fokke's #1. So I can reuse templates through out my app and to be able to put a ListView in a ScrollView. For example: I have a Video screen with a WebView playing a YouTube video. An Ad via a Native Module, 3 comments and 3 related video's. Because of the Native Module (not possible) and WebView (missing EventListeners) I can not use the ListView for the whole screen. So I use a ScrollView and 2 ListViews for the 3 comments and 3 related video's. That way I can still reuse my templates for related video's and comments
Test Case
Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/5947
Mac osx 1-.9.4 Maverics Appcelerator Studio, build: 3.4.0.201408201526 Titanium SDK, build: 3.4.0.v20140821144114 Node.JS Version: v0.10.28 NPM Path: /usr/local/bin/npm NPM Version: 1.4.23 acs@1.0.16 alloy@1.5.0-dev (git://github.com/appcelerator/alloy.git#b2e8f580d023e45c63072df924666e58193a8981) install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium@3.4.0-dev (git://github.com/appcelerator/titanium.git#9079326639c7f610dafee33dd16742de7d92d795) titanium-code-processor@1.1.1 Xcode6 Device: iPhone 5c iOS 7.1 Closing as fixed.