[TIMOB-16070] Android: TableView and SearchBar used together cause height: Ti.UI.SIZE to be ignored
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | Release 3.2.0 |
Fix Version/s | n/a |
Components | Android |
Labels | android, height, searchbar, tableview, ti.ui.height |
Reporter | Joe Webster |
Assignee | Unknown |
Created | 2013-10-23T19:59:40.000+0000 |
Updated | 2018-02-28T20:04:26.000+0000 |
Description
TableView behaves like the height property is set to Ti.UI.FILL - even if set to Ti.UI.SIZE when a searchBar is added via the search property. In the screen shot, you can see the result of toggling the search property on or off for the tableView. The table has no data/rows attached. With no search property set, the window background (white) is visible. When toggling it on, the table view with the red background fills the screen.
Initially posted here: http://developer.appcelerator.com/question/158544/android-searchbar-and-tableview-height-issue-with-tiuisize
var win = Ti.UI.createWindow({
backgroundColor:'#fff'
});
var searchBar = Ti.UI.createSearchBar({
top : 0,
width : Ti.UI.FILL,
height : 43,
barColor : '#FFF',
hintText : 'Search'
});
var searchTable = Ti.UI.createTableView({
//search : searchBar,
top : 0,
width : Ti.UI.FILL,
height : Ti.UI.SIZE,
backgroundColor: '#ff0000',
});
win.add(searchTable);
win.open();
Attachments
File | Date | Size |
---|---|---|
debug-tableview-searchbar.jpg | 2013-10-23T19:59:40.000+0000 | 20345 |
Tested this issue with the code below and was able to reproduce this on Android simulator and device.
Test Environment
Android SDK: 2.3.3 Ti SDK: 3.1.3 GA and 3.2.0 GA SDK Ti CLI: 3.2.0-cr3Test Code
Step to reproduce
Create a simple code with test code
Run this in Android Device
Table View color change when search property is used
We can reproduce this issue with 3.2.0.GA SDK. Table View height property behaves differently when search property is used. Moving this to engineering for further evaluation.