android - How do I fix the pull to refresh time? -
i using following code pull refresh : https://github.com/chrisbanes/android-pulltorefresh
however, replace last date , time displays eg: 2:30 pm, july 10 july 10, 2:30 pm. can point out code residing , line can interchange work?
thanks! justin
in sample code, in each activity (grid/list etc)eg: pulltorefreshlistactivity.java there method called:
mpullrefreshlistview.setonrefreshlistener(new onrefreshlistener<listview>() { @override public void onrefresh(pulltorefreshbase<listview> refreshview) { string label = dateutils.formatdatetime(getapplicationcontext(),system.currenttimemillis(), dateutils.format_show_time | dateutils.format_show_date | dateutils.format_abbrev_all); // update lastupdatedlabel refreshview.getloadinglayoutproxy().setlastupdatedlabel(label); // work refresh list here. new getdatatask().execute(); } });
the method updates text :
refreshview.getloadinglayoutproxy().setlastupdatedlabel(label);
and date created code:
string label = dateutils.formatdatetime(getapplicationcontext(),system.currenttimemillis(), dateutils.format_show_time | dateutils.format_show_date | dateutils.format_abbrev_all);
Comments
Post a Comment