private void handleDraftOperation(Intent intent) { token = intent.getStringExtra(Constants.TOKEN); if (TextUtils.isEmpty(token)) { token = BeeboApplication.getInstance().getAccessToken(); } replyDraftBean = intent.getParcelableExtra("draft"); getEditTextView().setText(replyDraftBean.getContent()); bean = replyDraftBean.getCommentBean(); getEditTextView().setHint("@" + bean.getUser().getScreen_name() + ":" + bean.getText()); }
@Override protected boolean canShowSaveDraftDialog() { if (replyDraftBean == null) { return true; } else if (!replyDraftBean.getContent().equals(getEditTextView().getText().toString())) { return true; } return false; }
@Override protected void removeDraft() { if (replyDraftBean != null) { DraftDBManager.getInstance().remove(replyDraftBean.getId()); } }