SwipeRefreshLayout is turning so fast

I have following project in Github : https://github.com/Ali-Rezaei/SavingGoals When It is failing to load data, I am showing an Error View and hide SwipeRefreshLayout. Here is binding adapter : @JvmStatic @BindingAdapter(“refreshing”) fun setSwipeRefreshLayout(view: SwipeRefreshLayout, resource: Resource<List<SavingsGoal>>?) { view.visibility = if (resource is Resource.Failure) View.GONE else View.VISIBLE view.isRefreshing = resource is Resource.Loading || resource is Resource.Reloading…

Details