@Override
  public boolean onKeyShortcut(int keyCode, KeyEvent event) {
    switch (keyCode) {
      case KeyEvent.KEYCODE_C:
        MessageListItem view = (MessageListItem) getSelectedView();
        if (view == null) {
          break;
        }
        MessageItem item = view.getMessageItem();
        if (item != null && item.isSms()) {
          ClipboardManager clip =
              (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);
          clip.setText(item.mBody);
          return true;
        }
        break;
    }

    return super.onKeyShortcut(keyCode, event);
  }
예제 #2
0
 public void reset(MessageListItem listItem) {
   mMessageId = listItem.getMessageItem().getMessageId();
 }
예제 #3
0
 public ImageLoadedCallback(MessageListItem listItem) {
   mListItem = listItem;
   mMessageId = listItem.getMessageItem().getMessageId();
 }