I'm updating a listview on an Android app. It currently has an iOS-like (but apparently still material) "swipe" to delete functionality, where you swipe over, and then a delete button becomes visible. I am now setting it so that not just anybody can perform the delete action. Only specific users, or the user who created the list item entry.

My question is: is it better to prevent the swipe action if they do not have the authority? Or should I allow them to swipe and then if they tap the delete icon, show an alert dialog?

  • Swipe is a hidden feature - you only know about it if you are told about it or discover it by accident, so swipe should be used in conjunction with a more overt alternative. The swipe therefore becomes a labour saving alternative.
    – SteveD
    Commented Oct 31, 2016 at 10:06

5 Answers 5


As a user, my first reaction after being shown that warning would be "then why did they show me the delete button to begin with?!"

Generally, it's best not to expose functions to a user that the user does not have access to perform. Take Stack Exchange for example: as your reputation increases and you gain additional permissions, those abilities are exposed to you as you acquire them.

At 1 reputation, you don't even see the close button on other people's posts because you cannot close posts. There would be no value to you seeing it to begin with.

The only main caveat I can think of is in a gamification context, where you do want people to see all the things they cannot yet do in order to tantalize them into working to acquire them. Your case does not fall into this category.


IMHO, your problem is not the active or disable delete button. Your problem is the SWIPE behavior. I mean, you're allowing a pretty obscure behavior (a lot of users don't know this is a possible behavior for apps, only for messages) and only to let them find if they will be able to delete the item or not.

So you're using 3 steps: tap, show, delete. And this last one will use a boolean condition, so different steps won't be consistent between each other.

In short: why don't you simply show a link/button to delete the item when possible and remove all the friction? This way, you can explain before hand that only items created by the user will be available for deletion, simple and to the point

EDIT: Just for reference, a conceptually similar and very known process: Facebook. You can delete your posts, you can delete comments made on your posts, admins can delete your posts. However, you can't delete other user's posts (or edit them, or do nothing but read). And the ability to delete posts is shown accordingly: if you have the appropriate credentials to delete posts (eg, you're the post owner), you'll be shown a link to do so. Otherwise, you won't see it


I would suggest you to go with disabling swipe action if user is not allowed to delete the item by swipe.

Why to increase the number of interaction for the case where nothing will going to happen other than showing alert message. if you disable the swipe action there will be no need for any alert as user will not reach the delete button.

If your list has multiple rows where user can delete some of then and not others, in that case you can place some indicator to show that current row can be deleted or not.


The user only knows about swiping-to-delete primarily through:

  • Discovery by accident or experimentation
  • Discvery by transferred interface expectations
  • Signifier: a graphic sub-element that tells user that the element can be swiped
  • Tutorial, whether in-app or by another person

You are deciding between:

  • Visible and disabled
  • Invisible and disabled

Where (in)ability is determined by user authority.

Is authority easily obtainable? For examples: getting X points, verifying email, or having a Y-day old account. Whether authority is easily obtainable or not determines whether the ability to delete an entry falls or doesn't fall within the user's area of concern. If a user cannot be expected to obtain sufficient authority—say because entry deletion meant to be solely in the few administrators' domain and never in the many users'—then it's none of the user's concern: there's no point in dangling something the user will never have. If this is the case, make the ability invisible and disabled so users don't need to know and probably won't ever need to know.

If the user can expect to obtain sufficient authority, and thus entry deletion is in the user's area of concern, then knowledge about entry deletion ability is relevant. That brings us back to the first list about how the user can know about swiping-to-delete.

If you make the ability invisible and disabled, it is incompatible with having a signifier because the signifier would signify nothing, a frustrating experience for a user who would assume that the signifier is misplaced. It is inconvenient with discovery by any means because if a new user, in building their conceptual model of their new app's interface, tries swiping a list element and gets no feedback, then they'll assume the element doesn't afford swiping and then move on. When the entry deletion is finally exposed, then you will rectify the user's conceptual model of the interface with a tutorial.

If you make the ability visible and disabled, then when the user discovers through any mean that a list element affords swiping, the user will also discover its intended, albeit not yet exposed, function, and the user will appropriately incorporate that discovery into their conceptual model. Signifiers will be compatible because the swipe affordance they promise will be delivered. Tutorials will be redundant.


There's no way known StackOverflow should ever be used as a good, positive example, or justification of UI/UX decision making, ever, as in the example given by msandford.

Doing so leads to the major problem with his entire premise : removing interactive swipes from one table view whilst retaining it in other parts of the app where it is possible creates MASSIVE uncertainty in the user as to when they can, where they can and why they can or can't in given places.

If you completely remove swiping from any table view, whilst others retain it, everyone that uses it will become frustrated and unsure.

Permit the swipe for everyone, show a greyed out delete facility for those that don't have authority to use it, and stick to the traditional Red delete for those that do.

If you have space, add the words "admin only" somewhere in the greyed out delete button area so the user can know who to appeal to if they really want something deleted.

  • Utter nonsense. I used SO only by example, not as a canonical reference of perfection. It is, however, a very common design pattern - example, example, example, though there are, of course, contrary opinions.
    – msanford
    Commented Oct 31, 2016 at 2:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.