android - Progress visibility not working in list view footer -
i using pagination in list view , displaying progress bar(small) in list view footer when user scroll down end of list view.
layoutinflater inflater = (layoutinflater)getactivity().getsystemservice(context.layout_inflater_service); view view = inflater.inflate(r.layout.list_footer, null); mylistview.addfooter(view).
then setting adapter follows
progressbar progressbar = (progressbar) getfooterview().findviewbyid(r.id.progressbar); madapter = new myadapter(baseactivity.getactivity(), 0, progressbar, myarraylist); mlist.setadapter(madapter);
in adapter class settings progress bar visibility in getview() method follows.
if(position == max_records) { progressbar.setvisibility(view.visible); // code goes here. } else progressbar.setvisibility(view.gone);
but progressbar not disappears when list has no data fetch. please me.
set progressbar visible state , use same code itself.
Comments
Post a Comment