protected void SetFooterState() { if (Vm.HasMoreItems && !Vm.HasLoadErrors) { loadState = RecyclerLoadState.Loading; } else if (Vm.HasMoreItems && Vm.HasLoadErrors) { loadState = RecyclerLoadState.Retry; } else if (!Vm.HasMoreItems && !Vm.HasLoadErrors) { loadState = RecyclerLoadState.Finished; } progressBar.Visibility = ViewStates.Gone; retryLayout.Visibility = ViewStates.Gone; if (loadState == RecyclerLoadState.Loading) { progressBar.Visibility = ViewStates.Visible; } else if (loadState == RecyclerLoadState.Retry) { retryLayout.Visibility = ViewStates.Visible; } }
public void SetFooterState(RecyclerLoadState state) { // TODO: Once the footer is in the "finished" state. // all remaining calls are rejected. Why? In a very special situations, scroll // loadMore call and initial LoadMore aren't called in the correct order. if (footerState == RecyclerLoadState.Finished) { return; } footerState = state; NotifyItemChanged(ItemCount - 1); }
public void Bind(RecyclerLoadState state) { progressBar.Visibility = ViewStates.Gone; retryLayout.Visibility = ViewStates.Gone; if (state == RecyclerLoadState.Loading) { progressBar.Visibility = ViewStates.Visible; } else if (state == RecyclerLoadState.Retry) { retryLayout.Visibility = ViewStates.Visible; } }