[TIMOB-12157] MobileWeb : SearchBar does not appear in portrait but works in landscape mode
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-01-25T23:35:23.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Anirudh Nagesh |
Assignee | Ingo Muschenetz |
Created | 2012-12-27T03:16:14.000+0000 |
Updated | 2014-06-19T12:43:42.000+0000 |
Description
According to the docs, searchbar is not supported on MobileWeb. But search bar appears in landscape mode but not in portrait. In the customer app, we can see the above behavior. I have a simple test case below which throws a blank red screen giving undefined error. Any clarification would be helpful.
var win = Titanium.UI.createWindow({
backgroundColor:'white',
});
// create table view data object
var data = [];
data[0] = Ti.UI.createTableViewRow({hasChild:true,title:'Row 1'});
data[1] = Ti.UI.createTableViewRow({hasDetail:true,title:'Row 2'});
data[2] = Ti.UI.createTableViewRow({hasCheck:true,title:'Row 3'});
data[3] = Ti.UI.createTableViewRow({title:'Row 4'});
var search = Titanium.UI.createSearchBar({
barColor:'#385292',
showCancel:false,
hintText:'search'
});
// create table view
var tableview = Titanium.UI.createTableView({
data:data,
search:search,
// searchHidden:true
hideSearchOnSelection : false,
filterAttribute : 'title'
});
// create table view event listener
tableview.addEventListener('click', function(e)
{
// event data
var index = e.index;
var section = e.section;
var row = e.row;
var rowdata = e.rowData;
Titanium.UI.createAlertDialog({title:'Table View',message:'row ' + row + ' index ' + index + ' section ' + section + ' row data ' + rowdata}).show();
});
// add table view to the window
win.add(tableview);
win.open();
Not sure what's going on here or where this ticket came from. Mobile Web doesn't even have a search bar implementation. Ti.UI.createSearchBar is undefined.
@Anirudh...can you please attach screenshots?
To clarify, that test app is supposed to crash on line 13. If it doesn't, that means you are using some unofficial 3rd party implementation, which we obviously don't support.
Closing as it is giving the mentioned error of no method 'createSearchBar' at line 13. Environment used for verification - Titanium SDK: 3.1.0.v20130228214607 Titanium Studio:3.0.2.201302141201