applidium / HeaderListView

Android ListView with sticky headers
http://applidium.com/en/news/headerlistview_for_android/
Other
313 stars 96 forks source link

HeaderListViewOnScrollListener.updateScrollBar #5

Closed androiddeveloper30 closed 10 years ago

androiddeveloper30 commented 10 years ago

I have imported your project and created a new project using the library given. It works fine till the values are static i have the setContentView() set as HeaderListview id. But when i change the from listview to HeaderListview in xml file it gives me the following error. " java.lang.ArithmeticException: / by zero at com.applidium.headerlistview.HeaderListView$HeaderListViewOnScrollListener.updateScrollBar(HeaderListView.java:215) at com.applidium.headerlistview.HeaderListView$HeaderListViewOnScrollListener.onScroll(HeaderListView.java:115) "

Please help me in solving this error. I need to setContentView() a different layout as i have other elements also on the same xml file.

genliu commented 10 years ago

Same issue

tokou commented 10 years ago

Hi, Thanks for your feedback. Unfortunately, I was not able to reproduce your issue, could you please attach some sample code ?

genliu commented 10 years ago

I was using it similar to the sample project. Instead of putting it in an Activity, I put it in a Fragment and return the ListView in onCreateView.

tokou commented 10 years ago

Hi, We tried to fix the issue based on the stack trace you gave us. We think it should be ok now, but since we were not able to reproduce it, we're not really sure. Can you tell us if your problem is fixed by this patch? If not, can you provide us a small sample project reproducing the bug?