Update to match new fragment context menu API.

Change-Id: I18950e55abd1e72d97f7a62393abe422001ee2f5
This commit is contained in:
Dianne Hackborn 2010-06-12 10:17:01 -07:00
parent 9cbc6721c7
commit 75939a7dc8

View File

@ -175,7 +175,7 @@ public class MailboxListFragment extends Fragment implements OnItemClickListener
* This is called via the activity
* TODO This will be removed when possible
*/
public void onContextItemSelected(MenuItem item) {
public boolean onContextItemSelected(MenuItem item) {
AdapterView.AdapterContextMenuInfo info =
(AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
@ -184,13 +184,14 @@ public class MailboxListFragment extends Fragment implements OnItemClickListener
if (mCallback != null) {
mCallback.onRefresh(mAccountId, info.id);
}
break;
return true;
case R.id.open:
if (mCallback != null) {
mCallback.onOpen(mAccountId, info.id);
}
break;
return true;
}
return false;
}
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {