コード例 #1
0
 @Override
 protected void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   outState.putParcelable(Constants.BEAN, bean);
   outState.putParcelable("replyDraftBean", replyDraftBean);
   outState.putBoolean("repost", enableRepost.isChecked());
 }
コード例 #2
0
 @Override
 protected void onPause() {
   // TODO Auto-generated method stub
   super.onPause();
   MobclickAgent.onPageEnd(this.getClass().getName());
   MobclickAgent.onPause(this);
 }
コード例 #3
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (savedInstanceState == null) {

      Intent intent = getIntent();
      String action = intent.getAction();
      if (!TextUtils.isEmpty(action)) {
        if (action.equals(WriteReplyToCommentActivity.ACTION_DRAFT)) {
          handleDraftOperation(intent);
        } else if (action.equals(WriteReplyToCommentActivity.ACTION_SEND_FAILED)) {
          handleFailedOperation(intent);
        } else if (action.equals(WriteReplyToCommentActivity.ACTION_NOTIFICATION_REPLY)) {
          handleNotificationReplyOperation(intent);
        }
      } else {
        handleNormalOperation(intent);
      }
    }

    enableRepost = (CheckBox) findViewById(R.id.repostCheckBox);
    enableRepost.setChecked(savedEnableRepost);

    mRepostRoot.setVisibility(View.VISIBLE);
    mCommentRoot.setVisibility(View.GONE);

    disPlayHomeAsUp(getToolbar());

    getSupportActionBar().setTitle(R.string.reply_to_comment);
  }
コード例 #4
0
 @Override
 protected void onRestoreInstanceState(Bundle savedInstanceState) {
   super.onRestoreInstanceState(savedInstanceState);
   if (savedInstanceState != null) {
     savedEnableRepost = savedInstanceState.getBoolean("repost", false);
     bean = savedInstanceState.getParcelable(Constants.BEAN);
     replyDraftBean = savedInstanceState.getParcelable("replyDraftBean");
   }
 }
コード例 #5
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    getActionBar().setTitle(R.string.comments);
    getActionBar().setSubtitle(GlobalContext.getInstance().getCurrentAccountName());

    token = getIntent().getStringExtra("token");
    if (TextUtils.isEmpty(token)) token = GlobalContext.getInstance().getSpecialToken();

    msg = (MessageBean) getIntent().getSerializableExtra("msg");
    if (msg == null) {
      commentDraftBean = (CommentDraftBean) getIntent().getSerializableExtra("draft");
      msg = commentDraftBean.getMessageBean();
      getEditTextView().setText(commentDraftBean.getContent());
    }

    getEditTextView().setHint("@" + msg.getUser().getScreen_name() + ":" + msg.getText());
  }