|
|
@ -58,8 +58,8 @@ public class FragmentAnswer extends FragmentBase {
|
|
|
|
private EditText etName;
|
|
|
|
private EditText etName;
|
|
|
|
private EditText etGroup;
|
|
|
|
private EditText etGroup;
|
|
|
|
private CheckBox cbStandard;
|
|
|
|
private CheckBox cbStandard;
|
|
|
|
private CheckBox cbFavorite;
|
|
|
|
|
|
|
|
private CheckBox cbReceipt;
|
|
|
|
private CheckBox cbReceipt;
|
|
|
|
|
|
|
|
private CheckBox cbFavorite;
|
|
|
|
private CheckBox cbHide;
|
|
|
|
private CheckBox cbHide;
|
|
|
|
private EditTextCompose etText;
|
|
|
|
private EditTextCompose etText;
|
|
|
|
private BottomNavigationView style_bar;
|
|
|
|
private BottomNavigationView style_bar;
|
|
|
@ -102,8 +102,8 @@ public class FragmentAnswer extends FragmentBase {
|
|
|
|
etName = view.findViewById(R.id.etName);
|
|
|
|
etName = view.findViewById(R.id.etName);
|
|
|
|
etGroup = view.findViewById(R.id.etGroup);
|
|
|
|
etGroup = view.findViewById(R.id.etGroup);
|
|
|
|
cbStandard = view.findViewById(R.id.cbStandard);
|
|
|
|
cbStandard = view.findViewById(R.id.cbStandard);
|
|
|
|
cbFavorite = view.findViewById(R.id.cbFavorite);
|
|
|
|
|
|
|
|
cbReceipt = view.findViewById(R.id.cbReceipt);
|
|
|
|
cbReceipt = view.findViewById(R.id.cbReceipt);
|
|
|
|
|
|
|
|
cbFavorite = view.findViewById(R.id.cbFavorite);
|
|
|
|
cbHide = view.findViewById(R.id.cbHide);
|
|
|
|
cbHide = view.findViewById(R.id.cbHide);
|
|
|
|
etText = view.findViewById(R.id.etText);
|
|
|
|
etText = view.findViewById(R.id.etText);
|
|
|
|
|
|
|
|
|
|
|
@ -191,8 +191,8 @@ public class FragmentAnswer extends FragmentBase {
|
|
|
|
etName.setText(answer == null ? a.getString("subject") : answer.name);
|
|
|
|
etName.setText(answer == null ? a.getString("subject") : answer.name);
|
|
|
|
etGroup.setText(answer == null ? null : answer.group);
|
|
|
|
etGroup.setText(answer == null ? null : answer.group);
|
|
|
|
cbStandard.setChecked(answer == null ? false : answer.standard);
|
|
|
|
cbStandard.setChecked(answer == null ? false : answer.standard);
|
|
|
|
cbFavorite.setChecked(answer == null ? false : answer.favorite);
|
|
|
|
|
|
|
|
cbReceipt.setChecked(answer == null ? false : answer.receipt);
|
|
|
|
cbReceipt.setChecked(answer == null ? false : answer.receipt);
|
|
|
|
|
|
|
|
cbFavorite.setChecked(answer == null ? false : answer.favorite);
|
|
|
|
cbHide.setChecked(answer == null ? false : answer.hide);
|
|
|
|
cbHide.setChecked(answer == null ? false : answer.hide);
|
|
|
|
|
|
|
|
|
|
|
|
String html = (answer == null ? a.getString("html") : answer.text);
|
|
|
|
String html = (answer == null ? a.getString("html") : answer.text);
|
|
|
@ -305,8 +305,8 @@ public class FragmentAnswer extends FragmentBase {
|
|
|
|
args.putString("name", etName.getText().toString().trim());
|
|
|
|
args.putString("name", etName.getText().toString().trim());
|
|
|
|
args.putString("group", etGroup.getText().toString().trim());
|
|
|
|
args.putString("group", etGroup.getText().toString().trim());
|
|
|
|
args.putBoolean("standard", cbStandard.isChecked());
|
|
|
|
args.putBoolean("standard", cbStandard.isChecked());
|
|
|
|
args.putBoolean("favorite", cbFavorite.isChecked());
|
|
|
|
|
|
|
|
args.putBoolean("receipt", cbReceipt.isChecked());
|
|
|
|
args.putBoolean("receipt", cbReceipt.isChecked());
|
|
|
|
|
|
|
|
args.putBoolean("favorite", cbFavorite.isChecked());
|
|
|
|
args.putBoolean("hide", cbHide.isChecked());
|
|
|
|
args.putBoolean("hide", cbHide.isChecked());
|
|
|
|
args.putString("html", HtmlHelper.toHtml(etText.getText(), getContext()));
|
|
|
|
args.putString("html", HtmlHelper.toHtml(etText.getText(), getContext()));
|
|
|
|
|
|
|
|
|
|
|
@ -327,8 +327,8 @@ public class FragmentAnswer extends FragmentBase {
|
|
|
|
String name = args.getString("name");
|
|
|
|
String name = args.getString("name");
|
|
|
|
String group = args.getString("group");
|
|
|
|
String group = args.getString("group");
|
|
|
|
boolean standard = args.getBoolean("standard");
|
|
|
|
boolean standard = args.getBoolean("standard");
|
|
|
|
boolean favorite = args.getBoolean("favorite");
|
|
|
|
|
|
|
|
boolean receipt = args.getBoolean("receipt");
|
|
|
|
boolean receipt = args.getBoolean("receipt");
|
|
|
|
|
|
|
|
boolean favorite = args.getBoolean("favorite");
|
|
|
|
boolean hide = args.getBoolean("hide");
|
|
|
|
boolean hide = args.getBoolean("hide");
|
|
|
|
String html = args.getString("html");
|
|
|
|
String html = args.getString("html");
|
|
|
|
|
|
|
|
|
|
|
@ -353,8 +353,8 @@ public class FragmentAnswer extends FragmentBase {
|
|
|
|
answer.name = name;
|
|
|
|
answer.name = name;
|
|
|
|
answer.group = group;
|
|
|
|
answer.group = group;
|
|
|
|
answer.standard = standard;
|
|
|
|
answer.standard = standard;
|
|
|
|
answer.favorite = favorite;
|
|
|
|
|
|
|
|
answer.receipt = receipt;
|
|
|
|
answer.receipt = receipt;
|
|
|
|
|
|
|
|
answer.favorite = favorite;
|
|
|
|
answer.hide = hide;
|
|
|
|
answer.hide = hide;
|
|
|
|
answer.text = document.body().html();
|
|
|
|
answer.text = document.body().html();
|
|
|
|
answer.id = db.answer().insertAnswer(answer);
|
|
|
|
answer.id = db.answer().insertAnswer(answer);
|
|
|
@ -363,8 +363,8 @@ public class FragmentAnswer extends FragmentBase {
|
|
|
|
answer.name = name;
|
|
|
|
answer.name = name;
|
|
|
|
answer.group = group;
|
|
|
|
answer.group = group;
|
|
|
|
answer.standard = standard;
|
|
|
|
answer.standard = standard;
|
|
|
|
answer.favorite = favorite;
|
|
|
|
|
|
|
|
answer.receipt = receipt;
|
|
|
|
answer.receipt = receipt;
|
|
|
|
|
|
|
|
answer.favorite = favorite;
|
|
|
|
answer.hide = hide;
|
|
|
|
answer.hide = hide;
|
|
|
|
answer.text = document.body().html();
|
|
|
|
answer.text = document.body().html();
|
|
|
|
db.answer().updateAnswer(answer);
|
|
|
|
db.answer().updateAnswer(answer);
|
|
|
|