When I run this I get a NullPointerException on this line. The problem is the "account" variable is null.

To determine the name of the account to delete you'll need to find out what account name was long-clicked.