Small layout change

pull/198/head
M66B 4 years ago
parent 700110d194
commit 6080818e57

@ -52,10 +52,10 @@ public class EntityAnswer implements Serializable {
@NonNull
public Boolean standard;
@NonNull
public Boolean favorite;
@NonNull
public Boolean receipt;
@NonNull
public Boolean favorite;
@NonNull
public Boolean hide;
@NonNull
public String text;
@ -124,8 +124,8 @@ public class EntityAnswer implements Serializable {
json.put("name", name);
json.put("group", group);
json.put("standard", standard);
json.put("favorite", favorite);
json.put("receipt", receipt);
json.put("favorite", favorite);
json.put("hide", hide);
json.put("text", text);
return json;
@ -137,8 +137,8 @@ public class EntityAnswer implements Serializable {
answer.name = json.getString("name");
answer.group = json.optString("group");
answer.standard = json.optBoolean("standard");
answer.favorite = json.optBoolean("favorite");
answer.receipt = json.optBoolean("receipt");
answer.favorite = json.optBoolean("favorite");
answer.hide = json.optBoolean("hide");
answer.text = json.getString("text");
return answer;
@ -151,8 +151,8 @@ public class EntityAnswer implements Serializable {
return (this.name.equals(other.name) &&
Objects.equals(this.group, other.group) &&
this.standard.equals(other.standard) &&
this.favorite.equals(other.favorite) &&
this.receipt.equals(other.receipt) &&
this.favorite.equals(other.favorite) &&
this.hide.equals(other.hide) &&
this.text.equals(other.text)
);

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

@ -63,24 +63,24 @@
app:layout_constraintTop_toBottomOf="@+id/etGroup" />
<CheckBox
android:id="@+id/cbFavorite"
android:id="@+id/cbReceipt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginTop="6dp"
android:text="@string/title_answer_favorite"
android:text="@string/title_answer_receipt"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbStandard" />
<CheckBox
android:id="@+id/cbReceipt"
android:id="@+id/cbFavorite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginTop="6dp"
android:text="@string/title_answer_receipt"
android:text="@string/title_answer_favorite"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbFavorite" />
app:layout_constraintTop_toBottomOf="@+id/cbReceipt" />
<CheckBox
android:id="@+id/cbHide"
@ -90,7 +90,7 @@
android:layout_marginTop="6dp"
android:text="@string/title_answer_hide"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbReceipt" />
app:layout_constraintTop_toBottomOf="@+id/cbFavorite" />
<View
android:id="@+id/vSeparator"

Loading…
Cancel
Save