@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); SmileyParser.init(getActivity()); notifications = new SipNotifications(getActivity()); clipboardManager = ClipboardWrapper.getInstance(getActivity()); }
@Override public boolean onContextItemSelected(android.view.MenuItem item) { AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo(); Cursor c = (Cursor) mAdapter.getItem(info.position); if (c != null) { SipMessage msg = new SipMessage(c); switch (item.getItemId()) { case MENU_COPY: { clipboardManager.setText(msg.getDisplayName(), msg.getBody()); break; } default: break; } } return super.onContextItemSelected(item); }