diff --git a/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/TablepoultryActivity.java b/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/TablepoultryActivity.java index bf3da88..f5968dc 100644 --- a/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/TablepoultryActivity.java +++ b/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/TablepoultryActivity.java @@ -68,10 +68,19 @@ public class TablepoultryActivity extends BaseActivity implements CalendarDialog } + private boolean flag=false; @Override protected void onResume() { super.onResume(); -// GetAllWeatherAreas(System.currentTimeMillis()); + if (flag==false) { + GetAllWeatherAreas(System.currentTimeMillis()); + } + } + + @Override + protected void onDestroy() { + super.onDestroy(); + flag= false; } private List rpcList; @@ -126,6 +135,7 @@ public class TablepoultryActivity extends BaseActivity implements CalendarDialog @Override public void onStartCalendarClick(Date date) { GetAllWeatherAreas(date.getTime()); + flag = true; EventBus.getDefault().postSticky(new ChoseEvent(date.getTime())); }