Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

SearchBar always at top even on scrolling Table View

$
0
0

Hi All,

I am developing a mobile application both for Android and iPhone by using Titanium SDK 3.1.3.

My problem is -

How do I make the searchBar always visible on top of a tableview when scrolling.

The code that I have got so far is

// SEARCH BAR
var searchBar = Titanium.UI.createSearchBar({
    barColor:'#FFF', 
    showCancel:true,
    height:40,
   // width:'auto',
    top:0,
    hintText:"Search",
    left:0
});
 
var dealsTableView = Ti.UI.createTableView({
                    top:0,
                    height : '100%',
                    width : '100%',
                    backgroundColor:'#404040',
                    data:dealsTableData,
                    search:searchBar,
                    searchHidden:true
});
v1.add(dealsTableView);
I have done a lot of search on this forum and also on the web but still I am not being able to have the searchBar always at top even on scrolling down the TableView to which the searchBar is attached.

Any help in this regard will be much appreciated.

Thanks a lot in advance.


Viewing all articles
Browse latest Browse all 7655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>