Android-PullToRefresh-SwipeMenuListView-Sample icon indicating copy to clipboard operation
Android-PullToRefresh-SwipeMenuListView-Sample copied to clipboard

there is a bug about the method 'getRefreshTime'

Open doggycoder opened this issue 9 years ago • 5 comments

when the swipemenulistview is scrolling, i exit from the application,pulltorefresh.RefreshTime.getRefreshTime has an error. i think you should judge the param 'context' not null of the method 'getRefresh'. And thank you for your project.

doggycoder avatar Dec 29 '15 01:12 doggycoder

Hi, I am confused about "an error", it means the application crashed, or the time is wrong, or init time is empty?

licaomeng avatar Dec 29 '15 07:12 licaomeng

context will be null when i press return key to exit from the application.but getRefreshTime has used the context.When i exit from the application with the swipemenulistview scrolling ,system show me a force dialog.

doggycoder avatar Dec 29 '15 07:12 doggycoder

Sorry, I can not reproduce the FC bug. My steps is as follows: Step 1: Pull down to scroll the ListView; Step 2: When the ListView is scrolling, I pressed the return key; Step 3: After return key pressed, the application is invisiable; Step 4: I reopened the application.

Through above four steps, there are not any force dialog as you said.

licaomeng avatar Dec 29 '15 08:12 licaomeng

Could you please give me more infomation about it? Clear steps as above are better, and screenshot or GIF is perfect. I will appreciate it if you could provide one of them.

licaomeng avatar Dec 30 '15 10:12 licaomeng

haaaa, I'm so sorry to reply you so late. It's only a minor point on MainActivity .And sorry to have bothered you.

public void onRefresh() { mHandler.postDelayed(new Runnable() { @Override public void run() { SimpleDateFormat df = new SimpleDateFormat("MM-dd HH:mm", Locale.getDefault()); RefreshTime.setRefreshTime(getContext(), df.format(new Date())); onLoad(); } }, 2000); }

getContext() will be null if I exit the application.

doggycoder avatar Jan 03 '16 03:01 doggycoder