80,352
社区成员
发帖
与我相关
我的任务
分享
# public void onScroll(AbsListView view,int firstVisibleItem,int visibleItemCount,int totalItemCount){
# int lastItem=firstVisibleItem+visibleItemCount-1;
#
# Log.d(TAG,"firstPos."+firstPos+" *firstVisibleItem."+firstVisibleItem);
# if(firstVisibleItem!=firstPos){
# firstPos=firstVisibleItem;
# //needToUpdate=true;
# //if(needToUpdate){ //需要更新,启动线程
# this.absListView=view;
# //Log.d(TAG,"noLooperThread."+noLooerThread+" isAlive."+noLooerThread.isAlive());
# if(noLooerThread!=null){
# //if(noLooerThread.isAlive()){
# //noLooerThread.stop();
# noLooerThread.interrupt();
# Log.d(TAG,"onScroll.noLooerThread.interrupt");
# noLooerThread=null;
# }
# noLooerThread=new NoLooperThread();
# noLooerThread.start();
# //}
# }
# }
int p = firstVisibleItem + visibleItemCount / 2 - 1;
Calendar ca = new GregorianCalendar(start_year,
start_month + p, 1);//这儿为什么要+p值呢
Calendar st = new GregorianCalendar(start_year,
start_month, start_day);
loc = (int) ((ca.getTimeInMillis() - st
.getTimeInMillis()) / 1000 / 60 / 60 / 24);//这个位置是怎么算的?
initLoaderData(ca, loc);
int e_c = (Integer)accumulator.get(loc).get(
"eCount");