|
|
@@ -284,7 +284,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
String text = notices.get(0).getText();
|
|
|
mNoticeTv.setText(text);
|
|
|
} else {
|
|
|
- mNoticeTv.setText("暂时无公告");
|
|
|
+ mNoticeTv.setText(R.string.no_notice);
|
|
|
}
|
|
|
|
|
|
mRoomNameTv.setText(mucRoom.getName());
|
|
|
@@ -293,9 +293,9 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
mCountTv.setText(mucRoom.getMaxUserSize() + "");
|
|
|
int s = FriendDao.getInstance().getFriendStatus(mLoginUserId, mRoom.getUserId());
|
|
|
if (s == -1) {
|
|
|
- sc_tv.setText("取消屏蔽群消息");
|
|
|
+ sc_tv.setText(R.string.no_block_room_message);
|
|
|
} else {
|
|
|
- sc_tv.setText("屏蔽群消息");
|
|
|
+ sc_tv.setText(R.string.block_room_message);
|
|
|
}
|
|
|
mCreateTime.setText(TimeUtils.s_long_2_str(mucRoom.getCreateTime() * 1000));
|
|
|
String myNickName = "";
|
|
|
@@ -365,11 +365,11 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
findViewById(R.id.banned_voice_rl).setVisibility(View.VISIBLE);
|
|
|
findViewById(R.id.banned_delete_rl).setVisibility(View.GONE);
|
|
|
findViewById(R.id.exit_room_rl).setVisibility(View.VISIBLE);
|
|
|
- btnExit.setText("删除商务群");
|
|
|
+ btnExit.setText(R.string.delete_room);
|
|
|
|
|
|
if (mucRoom.getCategory() == 1) {
|
|
|
if (CommonUtil.getSharedPreferences(mContext, "erp_commpany").equals(compName[0])) {
|
|
|
- btnExit.setText("删除商务群");
|
|
|
+ btnExit.setText(R.string.delete_room);
|
|
|
|
|
|
} else {
|
|
|
btnExit.setText("用户未在当前账套上");
|
|
|
@@ -412,12 +412,12 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
findViewById(R.id.shield_chat_rl).setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {//屏蔽群消息
|
|
|
- if (sc_tv.getText().toString().equals("屏蔽群消息")) {
|
|
|
+ if (sc_tv.getText().toString().equals(R.string.block_room_message)) {
|
|
|
addBlacklist(mRoom);
|
|
|
- sc_tv.setText("取消屏蔽群消息");
|
|
|
- } else if (sc_tv.getText().toString().equals("取消屏蔽群消息")) {
|
|
|
+ sc_tv.setText(R.string.no_block_room_message);
|
|
|
+ } else if (sc_tv.getText().toString().equals(R.string.no_block_room_message)) {
|
|
|
removeBlacklist(mRoom);
|
|
|
- sc_tv.setText("屏蔽群消息");
|
|
|
+ sc_tv.setText(R.string.block_room_message);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -430,7 +430,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
if (btnExit == null) {
|
|
|
btnExit = (Button) findViewById(R.id.btn_exit);
|
|
|
}
|
|
|
- btnExit.setText("退出商务群");
|
|
|
+ btnExit.setText(R.string.exit_room);
|
|
|
add_manage_rl.setVisibility(View.GONE);
|
|
|
remove_manage_rl.setVisibility(View.GONE);
|
|
|
findViewById(R.id.room_name_arrow_img).setVisibility(View.INVISIBLE);
|
|
|
@@ -447,12 +447,12 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
findViewById(R.id.shield_chat_rl).setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {//屏蔽群消息
|
|
|
- if (sc_tv.getText().toString().equals("屏蔽群消息")) {
|
|
|
+ if (sc_tv.getText().toString().equals(getString(R.string.block_room_message))) {
|
|
|
addBlacklist(mRoom);
|
|
|
- sc_tv.setText("取消屏蔽群消息");
|
|
|
- } else if (sc_tv.getText().toString().equals("取消屏蔽群消息")) {
|
|
|
+ sc_tv.setText(R.string.no_block_room_message);
|
|
|
+ } else if (sc_tv.getText().toString().equals(R.string.no_block_room_message)) {
|
|
|
removeBlacklist(mRoom);
|
|
|
- sc_tv.setText("屏蔽群消息");
|
|
|
+ sc_tv.setText(R.string.block_room_message);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -502,11 +502,11 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
View rootView = LayoutInflater.from(mContext).inflate(R.layout.activity_select_contacts, null);
|
|
|
ListView list = (ListView) rootView.findViewById(R.id.list_view);
|
|
|
Button ok_btn = (Button) rootView.findViewById(R.id.ok_btn);
|
|
|
- ok_btn.setText("确定");
|
|
|
+ ok_btn.setText(R.string.common_sure);
|
|
|
ListViewAdapter adapter = null;
|
|
|
String title = null;
|
|
|
if (h == ADD) {
|
|
|
- title = "添加管理员";
|
|
|
+ title = getString(R.string.add_administrators);
|
|
|
members.clear();
|
|
|
for (int i = 0; i < mMembers.size() - add_minus_count; i++) {
|
|
|
if (mMembers.get(i).getRole() == 3) {
|
|
|
@@ -515,7 +515,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
}
|
|
|
adapter = new ListViewAdapter(members);
|
|
|
} else {
|
|
|
- title = "移除管理员";
|
|
|
+ title = getString(R.string.remove_administrators);
|
|
|
members.clear();
|
|
|
for (int i = 0; i < mMembers.size() - add_minus_count; i++) {
|
|
|
if (mMembers.get(i).getRole() == 2) {
|
|
|
@@ -583,7 +583,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
public void onResponse(ObjectResult<Void> result) {
|
|
|
boolean success = Result.defaultParser(mContext, result, true);
|
|
|
if (success) {
|
|
|
- ToastMessage("操作成功");
|
|
|
+ ToastMessage(getString(R.string.submit_success));
|
|
|
dialog.dismiss();
|
|
|
}
|
|
|
}
|
|
|
@@ -658,7 +658,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
editText.setLines(2);
|
|
|
editText.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(this).setTitle(R.string.add_notice).setView(editText)
|
|
|
- .setPositiveButton(getString(R.string.sure), new DialogInterface.OnClickListener() {
|
|
|
+ .setPositiveButton(getString(R.string.common_sure), new DialogInterface.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
String text = editText.getText().toString().trim();
|
|
|
@@ -667,7 +667,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
}
|
|
|
updateRoom(null, text, null);
|
|
|
}
|
|
|
- }).setNegativeButton(getString(R.string.cancel), null);
|
|
|
+ }).setNegativeButton(getString(R.string.common_cancel), null);
|
|
|
builder.create().show();
|
|
|
|
|
|
}
|
|
|
@@ -689,7 +689,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
ToastUtil.addEditTextNumChanged(RoomInfoActivity.this, editText, 8);
|
|
|
editText.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
|
|
builderChangeNickNameDialog = new AlertDialog.Builder(this).setTitle(R.string.change_my_nickname).setView(editText)
|
|
|
- .setPositiveButton(getString(R.string.sure), new DialogInterface.OnClickListener() {
|
|
|
+ .setPositiveButton(getString(R.string.common_sure), new DialogInterface.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
String text = editText.getText().toString().trim();
|
|
|
@@ -698,7 +698,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
}
|
|
|
updateNickName(text);
|
|
|
}
|
|
|
- }).setNegativeButton(getString(R.string.cancel), null);
|
|
|
+ }).setNegativeButton(getString(R.string.common_cancel), null);
|
|
|
|
|
|
builderChangeNickNameDialog.create().show();
|
|
|
builderChangeNickNameDialog = null;
|
|
|
@@ -714,7 +714,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
ToastUtil.addEditTextNumChanged(RoomInfoActivity.this, editText, 8);
|
|
|
editText.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(this).setTitle(R.string.change_room_name).setView(editText)
|
|
|
- .setPositiveButton(getString(R.string.sure), new DialogInterface.OnClickListener() {
|
|
|
+ .setPositiveButton(getString(R.string.common_sure), new DialogInterface.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
String text = editText.getText().toString().trim();
|
|
|
@@ -723,7 +723,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
}
|
|
|
updateRoom(text, null, null);
|
|
|
}
|
|
|
- }).setNegativeButton(getString(R.string.cancel), null);
|
|
|
+ }).setNegativeButton(getString(R.string.common_cancel), null);
|
|
|
builder.create().show();
|
|
|
}
|
|
|
|
|
|
@@ -736,7 +736,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
ToastUtil.addEditTextNumChanged(RoomInfoActivity.this, editText, 20);
|
|
|
editText.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(this).setTitle(R.string.change_room_des).setView(editText)
|
|
|
- .setPositiveButton(getString(R.string.sure), new DialogInterface.OnClickListener() {
|
|
|
+ .setPositiveButton(getString(R.string.common_sure), new DialogInterface.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
String text = editText.getText().toString().trim();
|
|
|
@@ -745,7 +745,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
}
|
|
|
updateRoom(null, null, text);
|
|
|
}
|
|
|
- }).setNegativeButton(getString(R.string.cancel), null);
|
|
|
+ }).setNegativeButton(getString(R.string.common_cancel), null);
|
|
|
builder.create().show();
|
|
|
}
|
|
|
|
|
|
@@ -853,7 +853,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
}
|
|
|
|
|
|
private void showBanndedVoiceDialog(final int position, final String userId) {
|
|
|
- CharSequence[] items = new CharSequence[]{"不禁言", "禁言一天", "禁言3天", "禁言一周", "禁言半个月", "禁言一个月"};
|
|
|
+ CharSequence[] items = getResources().getStringArray(R.array.gags_select);
|
|
|
new AlertDialog.Builder(mContext).setTitle(R.string.banned_voice).setItems(items, new DialogInterface.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
@@ -907,9 +907,9 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
boolean success = Result.defaultParser(mContext, result, true);
|
|
|
if (success) {
|
|
|
if (time > TimeUtils.sk_time_current_time()) {
|
|
|
- ToastUtil.showToast(mContext, "禁言成功");
|
|
|
+ ToastUtil.showToast(mContext, R.string.gag_success);
|
|
|
} else {
|
|
|
- ToastUtil.showToast(mContext, "取消禁言成功");
|
|
|
+ ToastUtil.showToast(mContext, R.string.no_gag_success);
|
|
|
}
|
|
|
doBannedVoice = false;
|
|
|
mAdapter.notifyDataSetInvalidated();
|
|
|
@@ -959,7 +959,7 @@ public class RoomInfoActivity extends BaseActivity {
|
|
|
updateCreateFalgToERP(or_id);
|
|
|
}
|
|
|
ProgressDialogUtil.dismiss(dialog);
|
|
|
- ToastUtil.showToast(RoomInfoActivity.this, "操作成功!");
|
|
|
+ ToastUtil.showToast(RoomInfoActivity.this, R.string.submit_success);
|
|
|
new Handler().postDelayed(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|