public void StopMovingElements() { try { MoveElementsTask moveElementsTask = (MoveElementsTask)AppTask; foreach (var uuid in moveElementsTask.Uuids) { IStructureItem elementToMove = App.Kp2a.GetDb().KpDatabase.RootGroup.FindObject(uuid, true, null); if (elementToMove.ParentGroup != Group) { App.Kp2a.GetDb().Dirty.Add(elementToMove.ParentGroup); } } } catch (Exception e) { //don't crash if adding to dirty fails but log the exception: Kp2aLog.LogUnexpectedError(e); } AppTask = new NullTask(); AppTask.SetupGroupBaseActivityButtons(this); BaseAdapter adapter = (BaseAdapter)ListAdapter; adapter.NotifyDataSetChanged(); }
protected override void OnResume() { base.OnResume(); _design.ReapplyTheme(); AppTask.StartInGroupActivity(this); AppTask.SetupGroupBaseActivityButtons(this); RefreshIfDirty(); }
protected override void OnResume() { base.OnResume(); _design.ReapplyTheme(); AppTask.StartInGroupActivity(this); AppTask.SetupGroupBaseActivityButtons(this); UpdateAutofillInfo(); UpdateAndroid8NotificationInfo(); UpdateInfotexts(); RefreshIfDirty(); }
public void StopMovingElement() { try { MoveElementTask moveElementTask = (MoveElementTask)AppTask; IStructureItem elementToMove = App.Kp2a.GetDb().KpDatabase.RootGroup.FindObject(moveElementTask.Uuid, true, null); if (elementToMove.ParentGroup != Group) App.Kp2a.GetDb().Dirty.Add(elementToMove.ParentGroup); } catch (Exception e) { //don't crash if adding to dirty fails but log the exception: Kp2aLog.Log(e.ToString()); } AppTask = new NullTask(); AppTask.SetupGroupBaseActivityButtons(this); GroupView.ListView.InvalidateViews(); BaseAdapter adapter = (BaseAdapter)ListAdapter; adapter.NotifyDataSetChanged(); }