解决一些hardcode和命名规范
This commit is contained in:
@ -320,9 +320,9 @@ public class MessageDetailActivity extends BaseActivity implements OnCommentCall
|
||||
mColseCommentV.setVisibility(View.VISIBLE);
|
||||
|
||||
if (mCommentEntity != null && mCommentEntity.getUser() != null) {
|
||||
mMessageDetailEt.setHint("回复" + mCommentEntity.getUser().getName() + ":");
|
||||
mMessageDetailEt.setHint(getString(R.string.comment_repty_hint, mCommentEntity.getUser().getName()));
|
||||
} else {
|
||||
mMessageDetailEt.setHint("优质评论会被优先展示");
|
||||
mMessageDetailEt.setHint(getString(R.string.message_detail_comment_hint));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -336,7 +336,7 @@ public class MessageDetailActivity extends BaseActivity implements OnCommentCall
|
||||
|
||||
if (mCommentEntity != null) {
|
||||
mCommentEntity = null; // 清空当前评论实体
|
||||
mMessageDetailEt.setHint("优质评论会被优先展示");
|
||||
mMessageDetailEt.setHint(getString(R.string.message_detail_comment_hint));
|
||||
mMessageDetailEt.setText("");
|
||||
}
|
||||
}
|
||||
@ -369,7 +369,7 @@ public class MessageDetailActivity extends BaseActivity implements OnCommentCall
|
||||
return;
|
||||
}
|
||||
|
||||
mSendingDialog = DialogUtils.showWaitDialog(this, "正在提交");
|
||||
mSendingDialog = DialogUtils.showWaitDialog(this, getString(R.string.post_dialog_hint));
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
try {
|
||||
@ -456,20 +456,20 @@ public class MessageDetailActivity extends BaseActivity implements OnCommentCall
|
||||
String detail = errorJson.getString("detail");
|
||||
switch (detail) {
|
||||
case "too frequent":
|
||||
toast("别话痨哦~休息一会再来评论吧~");
|
||||
toast(getString(R.string.comment_failed_toofrequent));
|
||||
break;
|
||||
case "user blocked":
|
||||
toast("账号状态异常,暂时无法发表评论");
|
||||
toast(getString(R.string.comment_failed_userblocked));
|
||||
break;
|
||||
case "article blocked":
|
||||
toast("文章异常,无法发表评论");
|
||||
toast(getString(R.string.comment_failed_articleblocked));
|
||||
setSoftInput(false);
|
||||
break;
|
||||
case "illegal":
|
||||
toast("评论内容可能包括敏感信息,请修改后再发表");
|
||||
toast(getString(R.string.comment_failed_illegal));
|
||||
break;
|
||||
default:
|
||||
toast("评论失败,未知原因");
|
||||
toast(getString(R.string.comment_failed_unknown));
|
||||
break;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
@ -480,7 +480,7 @@ public class MessageDetailActivity extends BaseActivity implements OnCommentCall
|
||||
}
|
||||
}
|
||||
|
||||
toast("提交失败,请检查网络设置");
|
||||
toast(getString(R.string.post_failure_hint));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user