private async Task Refresh() { await _categoryView.LoadFromPersistence(); RunOnUiThread(delegate { CheckEmptyState(); _categoryListAdapter.NotifyDataSetChanged(); _categoryList.ScheduleLayoutAnimation(); }); }
public override async void OnViewCreated(View view, Bundle savedInstanceState) { base.OnViewCreated(view, savedInstanceState); await _categoryView.LoadFromPersistence(); _categoryListAdapter.NotifyDataSetChanged(); var selectedCategoryPosition = _currentCategoryId == null ? 0 : _categoryView.IndexOf(_currentCategoryId) + 1; _categoryListAdapter.SelectedPosition = selectedCategoryPosition; _categoryListAdapter.NotifyItemChanged(selectedCategoryPosition); }