I'm developing an Android application where I have entities A
and sub-entities B
.
An A
can have multiple B
s associated with it. (There's a database check for referential integrity).
I'm planning to implement a delete Action bar button with a trash icon. Bear in mind that checking for relationships may take time (asynchronously). Which of the following flows (or anything you can think of) would be better?
Post-confirm error checking
a) User clicks the delete button
b) User is asked if (s)he wants to delete the
A
(yes/no confirm)c) App displays:
Sorry, can't delete A, it still has Bs associated to it
(implying that (s)he has to delete allB
s first, but no shortcut to that)Pre-confirm error checking
a) User clicks the delete button
b) App displays:
Sorry, can't delete A, it still has Bs associated to it
(implying that (s)he has to delete allB
s first, but no shortcut to that)Pre-click error checking
a) User can't click the delete button it's not shown or disabled
(how would (s)he tell why it's not there?)Post double-confirm
a) User clicks the delete button
b) User is asked if (s)he wants to delete (yes/no confirm)
c) App displays:
Sorry, can't delete A, it still has Bs associated to it, do you want to delete these Bs as well?
Flexible confirmation
a) User clicks the delete button
Optionally: the delete icon changes based on anyB
s associated to the currentA
b) User is asked if (s)he wants to delete
A
and allB
s associated with it (yes/no confirm)
Optionally: theall Bs associated with it
part only shows if there are any.