Topener / nl.fokkezb.pullToRefresh

Widget to implement a table pull-to-refresh header in Titanium Alloy
184 stars 60 forks source link

[Android] It doesn't work well with SearchBar #12

Closed tlenclos closed 11 years ago

tlenclos commented 11 years ago

Hi, I can't make it work with a SearchBar in my tableview (even if I move the searchbar at the same level of the tableview).

<TableView id="table" onClick="openDetail">
   <SearchBar id="search" barColor="#385292" hintText="Recherche" />
   <Widget id="ptr" src="nl.fokkezb.pullToRefresh" onRelease="refreshList" />
</TableView>

There is always the "Pull to refresh" in front of my searchBar, I'm still investigating. Do you have any ideas/suggestions? Can you reproduce the case?

FokkeZB commented 11 years ago

Try putting the <SearchBar> after the <Widget>, but I'm afraid then still the zIndex of the headerView is higher then the searchBar's, which because the headerView gets a negative top, will move it under the headerView displaying the PTR.

tlenclos commented 11 years ago

It does the same effect, I've uploaded some pictures to show you. http://imgur.com/a/c4vQu

  1. When the window opens I can't see the searchBar.
  2. When I scroll the sidebar appears.
  3. When I pull the tableview, everything looks great.
FokkeZB commented 11 years ago

Yup, I'm afraid my workaround for headerPullView using headerView on Android doesn't do well with other items positioned at the top like the SearchBar. Not much I can do about that. You could try the Java-implementation on the MarketPlace?

https://marketplace.appcelerator.com/apps/5983?504301211