Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Low
-
Resolution: Fixed
-
Affects Version/s: Release 1.7.0, Release 1.7.1
-
Fix Version/s: Sprint 2011-27, Release 1.8.0
-
Component/s: iOS
-
Labels:
-
Environment:
iOS 4, Mobile 1.7.0 RC1
Description
Bug
If you set "searchHidden" to true, you can scroll perfectly the TableView.
But if you set it to false, you are unable to scroll until you click the SearchBar.
app.js |
Titanium.UI.setBackgroundColor('#000');
|
|
var tabGroup = Titanium.UI.createTabGroup();
|
|
var win1 = Titanium.UI.createWindow({
|
title:'Tab 1',
|
backgroundColor:'#fff'
|
});
|
win1.addEventListener('focus', function(){
|
tableview.searchHidden = false;
|
Ti.API.info("tableView = false");
|
});
|
|
var tab1 = Titanium.UI.createTab({
|
icon:'KS_nav_views.png',
|
title:'Tab 1',
|
window:win1
|
});
|
|
var searchBar = Ti.UI.createSearchBar({
|
cancel:false
|
});
|
|
var tableview = Ti.UI.createTableView({
|
search: searchBar,
|
scrollable:true,
|
data:[ { title:'dog'}, { title:"cat"}, { title:"bird"},
|
{ title:'frog'}, { title:"turtle"}, { title:"lizard"},
|
{ title:'hamster'}, { title:"snake"},
|
{ title:'shark'}, { title:"elephant"}, { title:"mouse"},
|
{ title:'lion'}, { title:"gorilla"}, { title:"eagle"},
|
{ title:'fish'}, { title:"squirrel"} ]
|
});
|
tableview.addEventListener("click", function(e) {
|
alert("Index " + e.index + " \n" + e.rowData.title);
|
});
|
|
var scrollView = Titanium.UI.createScrollView({
|
top:0,
|
contentHeight:0,
|
showVerticalScrollIndicator:true
|
});
|
|
scrollView.add(tableview);
|
win1.add(scrollView);
|
|
var win2 = Titanium.UI.createWindow({
|
title:'Tab 2',
|
backgroundColor:'#fff'
|
});
|
win2.addEventListener('focus', function(){
|
tableview.searchHidden = true;
|
Ti.API.info("tableView = true");
|
});
|
|
var tab2 = Titanium.UI.createTab({
|
icon:'KS_nav_ui.png',
|
title:'Tab 2',
|
window:win2
|
});
|
|
var label2 = Titanium.UI.createLabel({
|
color:'#999',
|
text:'I am Window 2',
|
font:{fontSize:20,fontFamily:'Helvetica Neue'},
|
textAlign:'center',
|
width:'auto'
|
});
|
|
win2.add(label2);
|
|
tabGroup.addTab(tab1);
|
tabGroup.addTab(tab2);
|
|
tabGroup.open();
|