Vikram Aggarwal | 5e5ac74 | 2011-12-19 08:14:16 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 Google Inc. |
| 3 | * Licensed to The Android Open Source Project. |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
Andy Huang | 30e2c24 | 2012-01-06 18:14:30 -0800 | [diff] [blame] | 18 | package com.android.mail.browse; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 19 | |
| 20 | import android.app.Activity; |
Paul Westbrook | f319688 | 2012-02-09 16:00:49 -0800 | [diff] [blame] | 21 | import android.app.LoaderManager; |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 22 | import android.content.ContentResolver; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 23 | import android.content.Context; |
Paul Westbrook | f319688 | 2012-02-09 16:00:49 -0800 | [diff] [blame] | 24 | import android.content.CursorLoader; |
| 25 | import android.content.Loader; |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 26 | import android.database.Cursor; |
| 27 | import android.net.Uri; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 28 | import android.os.Bundle; |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 29 | import android.view.LayoutInflater; |
| 30 | import android.view.Menu; |
| 31 | import android.view.MenuInflater; |
| 32 | import android.view.MenuItem; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 33 | import android.view.View; |
| 34 | import android.view.ViewGroup; |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 35 | import android.widget.AdapterView; |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 36 | import android.widget.SimpleCursorAdapter; |
| 37 | import android.widget.Spinner; |
| 38 | import android.widget.SpinnerAdapter; |
| 39 | import android.widget.TextView; |
| 40 | import android.widget.AdapterView.OnItemClickListener; |
| 41 | import android.widget.AdapterView.OnItemSelectedListener; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 42 | |
Andy Huang | 30e2c24 | 2012-01-06 18:14:30 -0800 | [diff] [blame] | 43 | import com.android.mail.R; |
Vikram Aggarwal | 1ddcf0f | 2012-01-13 11:45:02 -0800 | [diff] [blame] | 44 | import com.android.mail.browse.ConversationCursor.ConversationListener; |
Andy Huang | 30e2c24 | 2012-01-06 18:14:30 -0800 | [diff] [blame] | 45 | import com.android.mail.compose.ComposeActivity; |
Mindy Pereira | 33fe908 | 2012-01-09 16:24:30 -0800 | [diff] [blame] | 46 | import com.android.mail.providers.Account; |
Andy Huang | 30e2c24 | 2012-01-06 18:14:30 -0800 | [diff] [blame] | 47 | import com.android.mail.providers.AccountCacheProvider; |
Andy Huang | 732600e | 2012-01-10 17:47:17 -0800 | [diff] [blame] | 48 | import com.android.mail.providers.Conversation; |
Andy Huang | 30e2c24 | 2012-01-06 18:14:30 -0800 | [diff] [blame] | 49 | import com.android.mail.providers.UIProvider; |
Marc Blank | 8d69d4e | 2012-01-25 12:04:28 -0800 | [diff] [blame] | 50 | import com.android.mail.providers.UIProvider.ConversationColumns; |
Marc Blank | 4015c18 | 2012-01-31 12:38:36 -0800 | [diff] [blame] | 51 | import com.android.mail.ui.ActionCompleteListener; |
Mindy Pereira | 9879d4c | 2012-01-31 09:34:18 -0800 | [diff] [blame] | 52 | import com.android.mail.ui.AnimatedAdapter; |
| 53 | import com.android.mail.ui.AnimatedListView; |
Vikram Aggarwal | 1ddcf0f | 2012-01-13 11:45:02 -0800 | [diff] [blame] | 54 | import com.android.mail.ui.ConversationSelectionSet; |
| 55 | import com.android.mail.ui.ConversationSetObserver; |
Vikram Aggarwal | d247dc9 | 2012-02-10 15:49:01 -0800 | [diff] [blame] | 56 | import com.android.mail.ui.RestrictedActivity; |
Mindy Pereira | 96b5c35 | 2012-02-01 11:33:40 -0800 | [diff] [blame] | 57 | import com.android.mail.ui.UndoBarView; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 58 | |
Marc Blank | 97bca7b | 2012-01-24 11:17:00 -0800 | [diff] [blame] | 59 | import java.util.ArrayList; |
| 60 | |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 61 | public class ConversationListActivity extends Activity implements OnItemSelectedListener, |
Paul Westbrook | f319688 | 2012-02-09 16:00:49 -0800 | [diff] [blame] | 62 | OnItemClickListener, ConversationSetObserver, ConversationListener, ActionCompleteListener, |
Vikram Aggarwal | d247dc9 | 2012-02-10 15:49:01 -0800 | [diff] [blame] | 63 | LoaderManager.LoaderCallbacks<Cursor>, RestrictedActivity { |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 64 | |
Mindy Pereira | 9879d4c | 2012-01-31 09:34:18 -0800 | [diff] [blame] | 65 | private AnimatedListView mListView; |
| 66 | private AnimatedAdapter mListAdapter; |
Marc Blank | 48eba7a | 2012-01-27 16:16:19 -0800 | [diff] [blame] | 67 | private ConversationCursor mConversationListCursor; |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 68 | private Spinner mAccountsSpinner; |
| 69 | private AccountsSpinnerAdapter mAccountsAdapter; |
| 70 | private ContentResolver mResolver; |
Mindy Pereira | 33fe908 | 2012-01-09 16:24:30 -0800 | [diff] [blame] | 71 | private Account mSelectedAccount; |
Mindy Pereira | 11b0bbd | 2012-01-24 10:06:17 -0800 | [diff] [blame] | 72 | /** The selected conversations. */ |
| 73 | protected ConversationSelectionSet mBatchConversations = new ConversationSelectionSet(); |
| 74 | private SelectedConversationsActionMenu mSelectedConversationsActionMenu; |
Mindy Pereira | 96b5c35 | 2012-02-01 11:33:40 -0800 | [diff] [blame] | 75 | private UndoBarView mUndoView; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 76 | |
Andy Huang | 98b4e90 | 2012-01-06 18:00:07 -0800 | [diff] [blame] | 77 | @Override |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 78 | public void onCreate(Bundle savedInstanceState) { |
| 79 | super.onCreate(savedInstanceState); |
Mindy Pereira | 0944e5e | 2012-01-03 11:14:58 -0800 | [diff] [blame] | 80 | setContentView(R.layout.conversation_list_activity); |
Mindy Pereira | 9879d4c | 2012-01-31 09:34:18 -0800 | [diff] [blame] | 81 | mListView = (AnimatedListView) findViewById(R.id.browse_list); |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 82 | mListView.setOnItemClickListener(this); |
| 83 | mAccountsSpinner = (Spinner) findViewById(R.id.accounts_spinner); |
| 84 | mResolver = getContentResolver(); |
Paul Westbrook | f319688 | 2012-02-09 16:00:49 -0800 | [diff] [blame] | 85 | // TODO: determine if we need to create a fake cursor that contains the account list from |
| 86 | // last time that the application was run. If getting the list of accounts take a long |
| 87 | // time, this would prevent an empty spinner from being shown. |
| 88 | mAccountsAdapter = new AccountsSpinnerAdapter(this, null); |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 89 | mAccountsSpinner.setAdapter(mAccountsAdapter); |
| 90 | mAccountsSpinner.setOnItemSelectedListener(this); |
Mindy Pereira | 11b0bbd | 2012-01-24 10:06:17 -0800 | [diff] [blame] | 91 | mBatchConversations.addObserver(this); |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 92 | } |
Mindy Pereira | 67d7572 | 2012-02-13 10:46:21 -0800 | [diff] [blame^] | 93 | |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 94 | @Override |
Paul Westbrook | f319688 | 2012-02-09 16:00:49 -0800 | [diff] [blame] | 95 | public void onResume() { |
| 96 | super.onResume(); |
| 97 | // Prepare the loader. Either re-connect with an existing one, |
| 98 | // or start a new one. |
| 99 | getLoaderManager().initLoader(0, null, this); |
| 100 | } |
| 101 | |
| 102 | @Override |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 103 | public boolean onCreateOptionsMenu(Menu menu) { |
| 104 | super.onCreateOptionsMenu(menu); |
| 105 | MenuInflater inflater = getMenuInflater(); |
| 106 | inflater.inflate(R.menu.conversation_list_menu, menu); |
| 107 | return true; |
| 108 | } |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 109 | |
Andy Huang | 98b4e90 | 2012-01-06 18:00:07 -0800 | [diff] [blame] | 110 | @Override |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 111 | public boolean onOptionsItemSelected(MenuItem item) { |
| 112 | boolean handled = true; |
| 113 | int id = item.getItemId(); |
| 114 | switch (id) { |
| 115 | case R.id.compose: |
| 116 | ComposeActivity.compose(this, mSelectedAccount); |
| 117 | break; |
| 118 | default: |
| 119 | handled = false; |
| 120 | break; |
| 121 | } |
| 122 | return handled; |
| 123 | } |
| 124 | |
Paul Westbrook | f319688 | 2012-02-09 16:00:49 -0800 | [diff] [blame] | 125 | @Override |
| 126 | public Loader<Cursor> onCreateLoader(int id, Bundle args) { |
| 127 | // Currently this activity only creates a single loader (Account List) |
| 128 | return new CursorLoader(this, AccountCacheProvider.getAccountsUri(), |
| 129 | UIProvider.ACCOUNTS_PROJECTION, null, null, null); |
| 130 | } |
| 131 | |
| 132 | @Override |
| 133 | public void onLoadFinished(Loader<Cursor> loader, Cursor data) { |
| 134 | // Set the new data in the adapter. |
| 135 | mAccountsAdapter.changeCursor(data); |
| 136 | } |
| 137 | |
| 138 | @Override |
| 139 | public void onLoaderReset(Loader<Cursor> loader) { |
| 140 | // Clear the data in the adapter. |
| 141 | mAccountsAdapter.changeCursor(null); |
| 142 | } |
| 143 | |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 144 | class AccountsSpinnerAdapter extends SimpleCursorAdapter implements SpinnerAdapter { |
| 145 | |
| 146 | private LayoutInflater mLayoutInflater; |
| 147 | |
| 148 | public AccountsSpinnerAdapter(Context context, Cursor cursor) { |
| 149 | super(context, android.R.layout.simple_dropdown_item_1line, cursor, |
| 150 | UIProvider.ACCOUNTS_PROJECTION, null, 0); |
| 151 | mLayoutInflater = LayoutInflater.from(context); |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 152 | } |
| 153 | |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 154 | @Override |
| 155 | public View getDropDownView(int position, View convertView, ViewGroup parent) { |
| 156 | return getView(position, convertView, parent); |
| 157 | } |
| 158 | |
Andy Huang | 98b4e90 | 2012-01-06 18:00:07 -0800 | [diff] [blame] | 159 | @Override |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 160 | public View newView(Context context, Cursor cursor, ViewGroup parent) { |
| 161 | return mLayoutInflater.inflate(android.R.layout.simple_dropdown_item_1line, null); |
| 162 | } |
| 163 | |
| 164 | @Override |
| 165 | public void bindView(View view, Context context, Cursor cursor) { |
| 166 | int accountNameCol = cursor.getColumnIndex(UIProvider.AccountColumns.NAME); |
| 167 | ((TextView) view.findViewById(android.R.id.text1)).setText(cursor |
| 168 | .getString(accountNameCol)); |
| 169 | } |
| 170 | } |
| 171 | |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 172 | @Override |
| 173 | public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { |
Marc Blank | c8a9942 | 2012-01-19 14:27:47 -0800 | [diff] [blame] | 174 | // Get an account and a folder list |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 175 | Uri foldersUri = null; |
| 176 | Cursor cursor = mAccountsAdapter.getCursor(); |
| 177 | if (cursor != null && cursor.moveToPosition(position)) { |
| 178 | int uriCol = cursor.getColumnIndex(UIProvider.AccountColumns.FOLDER_LIST_URI); |
| 179 | foldersUri = Uri.parse(cursor.getString(uriCol)); |
Mindy Pereira | 33fe908 | 2012-01-09 16:24:30 -0800 | [diff] [blame] | 180 | mSelectedAccount = new Account(cursor); |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 181 | cursor.close(); |
| 182 | } |
| 183 | Uri conversationListUri = null; |
| 184 | if (foldersUri != null) { |
| 185 | cursor = mResolver.query(foldersUri, UIProvider.FOLDERS_PROJECTION, null, null, null); |
| 186 | if (cursor != null) { |
| 187 | int uriCol = cursor.getColumnIndex(UIProvider.FolderColumns.CONVERSATION_LIST_URI); |
| 188 | cursor.moveToFirst(); |
| 189 | conversationListUri = Uri.parse(cursor.getString(uriCol)); |
| 190 | cursor.close(); |
| 191 | } |
| 192 | } |
Marc Blank | c8a9942 | 2012-01-19 14:27:47 -0800 | [diff] [blame] | 193 | // We need to have a conversation list here... |
| 194 | if (conversationListUri == null) { |
| 195 | throw new IllegalStateException("No conversation list for this account"); |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 196 | } |
Marc Blank | c8a9942 | 2012-01-19 14:27:47 -0800 | [diff] [blame] | 197 | // Create the cursor for the list using the update cache |
Marc Blank | 3b2d913 | 2012-02-05 12:21:10 -0800 | [diff] [blame] | 198 | // Make this asynchronous |
Marc Blank | 7ac01cc | 2012-02-08 09:19:36 -0800 | [diff] [blame] | 199 | if (mConversationListCursor != null) { |
| 200 | mConversationListCursor.close(); |
| 201 | } |
Marc Blank | 48eba7a | 2012-01-27 16:16:19 -0800 | [diff] [blame] | 202 | mConversationListCursor = |
Marc Blank | c43bc0a | 2012-02-02 11:25:18 -0800 | [diff] [blame] | 203 | ConversationCursor.create(this, UIProvider.ConversationColumns.URI, |
Marc Blank | 48eba7a | 2012-01-27 16:16:19 -0800 | [diff] [blame] | 204 | conversationListUri, UIProvider.CONVERSATION_PROJECTION, null, null, null); |
Mindy Pereira | 9879d4c | 2012-01-31 09:34:18 -0800 | [diff] [blame] | 205 | mListAdapter = new AnimatedAdapter(this, position, mConversationListCursor, |
| 206 | mBatchConversations, mSelectedAccount); |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 207 | mListView.setAdapter(mListAdapter); |
Marc Blank | 48eba7a | 2012-01-27 16:16:19 -0800 | [diff] [blame] | 208 | mConversationListCursor.setListener(this); |
Mindy Pereira | 015c269 | 2012-01-05 15:01:18 -0800 | [diff] [blame] | 209 | } |
| 210 | |
| 211 | @Override |
| 212 | public void onNothingSelected(AdapterView<?> parent) { |
| 213 | } |
| 214 | |
| 215 | @Override |
| 216 | public void onItemClick(AdapterView<?> parent, View view, int position, long id) { |
Andy Huang | 732600e | 2012-01-10 17:47:17 -0800 | [diff] [blame] | 217 | Conversation conv = ((ConversationItemView) view).getConversation(); |
| 218 | ConversationViewActivity.viewConversation(this, conv, mSelectedAccount); |
Marc Blank | 8d69d4e | 2012-01-25 12:04:28 -0800 | [diff] [blame] | 219 | // Quick and dirty flag change |
| 220 | if (!conv.read) { |
| 221 | conv.read = true; |
| 222 | conv.updateBoolean(this, ConversationColumns.READ, true); |
Marc Blank | 03bbaad | 2012-01-31 11:27:16 -0800 | [diff] [blame] | 223 | // For now, update the display |
| 224 | mListAdapter.notifyDataSetChanged(); |
Marc Blank | 8d69d4e | 2012-01-25 12:04:28 -0800 | [diff] [blame] | 225 | } |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 226 | } |
Marc Blank | c8a9942 | 2012-01-19 14:27:47 -0800 | [diff] [blame] | 227 | |
Marc Blank | c8a9942 | 2012-01-19 14:27:47 -0800 | [diff] [blame] | 228 | @Override |
Vikram Aggarwal | 1ddcf0f | 2012-01-13 11:45:02 -0800 | [diff] [blame] | 229 | public void onSetEmpty() { |
Mindy Pereira | 11b0bbd | 2012-01-24 10:06:17 -0800 | [diff] [blame] | 230 | mSelectedConversationsActionMenu = null; |
| 231 | } |
| 232 | |
| 233 | @Override |
Vikram Aggarwal | 1ddcf0f | 2012-01-13 11:45:02 -0800 | [diff] [blame] | 234 | public void onSetPopulated(ConversationSelectionSet set) { |
Mindy Pereira | 11b0bbd | 2012-01-24 10:06:17 -0800 | [diff] [blame] | 235 | mSelectedConversationsActionMenu = new SelectedConversationsActionMenu(this, |
Mindy Pereira | 67d7572 | 2012-02-13 10:46:21 -0800 | [diff] [blame^] | 236 | mBatchConversations, mListAdapter, this, mSelectedAccount, this); |
Mindy Pereira | 11b0bbd | 2012-01-24 10:06:17 -0800 | [diff] [blame] | 237 | mSelectedConversationsActionMenu.activate(); |
| 238 | } |
| 239 | |
| 240 | @Override |
| 241 | public void onSetChanged(ConversationSelectionSet set) { |
Vikram Aggarwal | d247dc9 | 2012-02-10 15:49:01 -0800 | [diff] [blame] | 242 | // Do nothing, we don't care about changes to the selection set. |
Marc Blank | c8a9942 | 2012-01-19 14:27:47 -0800 | [diff] [blame] | 243 | } |
Marc Blank | 97bca7b | 2012-01-24 11:17:00 -0800 | [diff] [blame] | 244 | |
| 245 | // ConversationListener implementation |
Marc Blank | 48eba7a | 2012-01-27 16:16:19 -0800 | [diff] [blame] | 246 | // Underlying provider updates, etc. |
| 247 | |
| 248 | /** |
| 249 | * Called when there is new data at the underlying provider |
| 250 | * refresh() here causes the new data to be retrieved asynchronously |
| 251 | * NOTE: The UI needn't take any action immediately (i.e. it might wait until a more |
| 252 | * convenient time to get the update from the provider) |
| 253 | */ |
Marc Blank | 8d69d4e | 2012-01-25 12:04:28 -0800 | [diff] [blame] | 254 | @Override |
Marc Blank | 48eba7a | 2012-01-27 16:16:19 -0800 | [diff] [blame] | 255 | public void onRefreshRequired() { |
| 256 | // Refresh the query in the background |
| 257 | mConversationListCursor.refresh(); |
| 258 | } |
| 259 | |
| 260 | /** |
Marc Blank | 4e25c94 | 2012-02-02 19:41:14 -0800 | [diff] [blame] | 261 | * Complete the cursor refresh process by syncing to the underlying cursor and redrawing |
Marc Blank | 4015c18 | 2012-01-31 12:38:36 -0800 | [diff] [blame] | 262 | */ |
| 263 | private void finishRefresh() { |
| 264 | // Swap cursors |
Marc Blank | 4e25c94 | 2012-02-02 19:41:14 -0800 | [diff] [blame] | 265 | mConversationListCursor.sync(); |
Marc Blank | 4015c18 | 2012-01-31 12:38:36 -0800 | [diff] [blame] | 266 | // Redraw with new data |
| 267 | mListAdapter.notifyDataSetChanged(); |
| 268 | } |
| 269 | |
| 270 | /** |
Marc Blank | 48eba7a | 2012-01-27 16:16:19 -0800 | [diff] [blame] | 271 | * Called when new data from the underlying provider is ready for use |
| 272 | * swapCursors() causes the cursor to reflect the refreshed data |
| 273 | * notifyDataSetChanged() causes the list to redraw |
| 274 | * NOTE: The UI needn't take any action immediately if it's otherwise engaged (animating, for |
| 275 | * example) |
| 276 | */ |
| 277 | @Override |
| 278 | public void onRefreshReady() { |
Marc Blank | 4015c18 | 2012-01-31 12:38:36 -0800 | [diff] [blame] | 279 | ArrayList<Integer> deletedRows = mConversationListCursor.getRefreshDeletions(); |
| 280 | // If we have any deletions from the server, animate them away |
| 281 | if (!deletedRows.isEmpty()) { |
Mindy Pereira | fac92d7 | 2012-02-01 10:58:33 -0800 | [diff] [blame] | 282 | mListAdapter.delete(deletedRows); |
Marc Blank | 4015c18 | 2012-01-31 12:38:36 -0800 | [diff] [blame] | 283 | } else { |
| 284 | finishRefresh(); |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | @Override |
| 289 | public void onActionComplete() { |
Mindy Pereira | 96b5c35 | 2012-02-01 11:33:40 -0800 | [diff] [blame] | 290 | showUndo(); |
| 291 | } |
| 292 | |
| 293 | private void showUndo() { |
| 294 | mUndoView = (UndoBarView)findViewById(R.id.undo_view); |
Marc Blank | 3b2d913 | 2012-02-05 12:21:10 -0800 | [diff] [blame] | 295 | mUndoView.show(true, this, "undo", mSelectedAccount, mListAdapter); |
Marc Blank | 97bca7b | 2012-01-24 11:17:00 -0800 | [diff] [blame] | 296 | } |
Vikram Aggarwal | d247dc9 | 2012-02-10 15:49:01 -0800 | [diff] [blame] | 297 | |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 298 | } |