This is fairly easy if you actually know where to look. And believe me, the first time I attempted to do this, I got lost.
Getting straight to the point, here is how to remove an account in the Android Email App:
1. Main Apps Menu > Settings > ACCOUNTS > Corporate
2. Select the desired account (should have a green ‘sync’ icon to the left of the account name)
3. Next screen should say ‘Sync’ in the upper left of the header navigation bar. Choose the far right ‘3 dots’ drop down menu
4. Choose “Remove account”
Honestly, I am glad I got this to work the first time. Otherwise, I totally would have been stuck for who knows how long.
It probably had been more than 2 years since I used ListView and modified its contents like adding, removing and updating. When I made another go recently, I was confused why the ListView does not refresh its content.
I thought calling the notifyDataSetChanged() of ArrayAdapter after add() or remove() will do the trick in the onPostExecute() of the AsyncTask class.
The solution is not to use the add() or remove() method of the ArrayAdapter class. Instead, you place a global variable in your class for the ArrayList object that you will pass to the ArrayAdapter.
Make sure the myArrayList variable is global. So that within your AsyncTask class, you can call add() or remove() method of the ArrayAdapter class within doInBackground() of AsyncTask and call adapter.notifyDataSetChanged() onPostExecute().