private void doGetBannerUsers() { lastArea = SalonTools.getArea(mActivity); mActivity.showWaitDialog(); accountService.getBannerUsers( SalonTools.getArea(mActivity), new AsyncResponseCompletedHandler<String>() { @Override public String doCompleted(ResponseBean<?> response, ChCareWepApiServiceType servieType) { salons.clear(); barbers.clear(); if (response.getState() >= 0 && response.getData() != null) { ArrayList<SalonUser> users = (ArrayList<SalonUser>) response.getData(); for (SalonUser user : users) { if (user.getRole() == Role.SALON) { salons.add(user); } else if (user.getRole() == Role.BARBER) { barbers.add(user); } } } initSalons(); initBarbers(); doGetBanners(); return null; } }); }
private void doGetBanners() { mActivity.showWaitDialog(); accountService.getBanners( new AsyncResponseCompletedHandler<String>() { @Override public String doCompleted(ResponseBean<?> response, ChCareWepApiServiceType servieType) { if (response.getState() >= 0 && response.getData() != null) { banners = (ArrayList<BannerPic>) response.getData(); } mActivity.hideAllDialog(); initAdViewPager(); initMallViewPager(); checkUpdate(); return null; } }); }