Small layout improvement

pull/207/head
M66B 3 years ago
parent c0daddef8c
commit b85c733496

@ -690,9 +690,9 @@ public class EntityRule {
long aid = jargs.getLong("answer");
boolean answer_subject = jargs.optBoolean("answer_subject", false);
boolean original_text = jargs.optBoolean("original_text", true);
boolean attachments = jargs.optBoolean("attachments");
String to = jargs.optString("to");
boolean cc = jargs.optBoolean("cc");
boolean attachments = jargs.optBoolean("attachments");
boolean isReply = TextUtils.isEmpty(to);

@ -142,10 +142,10 @@ public class FragmentRule extends FragmentBase {
private Spinner spAnswer;
private CheckBox cbAnswerSubject;
private CheckBox cbOriginalText;
private CheckBox cbWithAttachments;
private EditText etTo;
private ImageButton ibTo;
private CheckBox cbCc;
private CheckBox cbWithAttachments;
private Button btnTtsSetup;
private Button btnTtsData;
@ -294,10 +294,10 @@ public class FragmentRule extends FragmentBase {
spAnswer = view.findViewById(R.id.spAnswer);
cbAnswerSubject = view.findViewById(R.id.cbAnswerSubject);
cbOriginalText = view.findViewById(R.id.cbOriginalText);
cbWithAttachments = view.findViewById(R.id.cbWithAttachments);
etTo = view.findViewById(R.id.etTo);
ibTo = view.findViewById(R.id.ibTo);
cbCc = view.findViewById(R.id.cbCc);
cbWithAttachments = view.findViewById(R.id.cbWithAttachments);
btnTtsSetup = view.findViewById(R.id.btnTtsSetup);
btnTtsData = view.findViewById(R.id.btnTtsData);
@ -1143,10 +1143,10 @@ public class FragmentRule extends FragmentBase {
cbAnswerSubject.setChecked(jaction.optBoolean("answer_subject", false));
cbOriginalText.setChecked(jaction.optBoolean("original_text", true));
cbWithAttachments.setChecked(jaction.optBoolean("attachments"));
etTo.setText(jaction.optString("to"));
cbCc.setChecked(jaction.optBoolean("cc"));
cbWithAttachments.setChecked(jaction.optBoolean("attachments"));
break;
case EntityRule.TYPE_SOUND:
@ -1486,9 +1486,9 @@ public class FragmentRule extends FragmentBase {
jaction.put("answer", answer == null || answer.id == null ? -1 : answer.id);
jaction.put("answer_subject", cbAnswerSubject.isChecked());
jaction.put("original_text", cbOriginalText.isChecked());
jaction.put("attachments", cbWithAttachments.isChecked());
jaction.put("to", etTo.getText().toString().trim());
jaction.put("cc", cbCc.isChecked());
jaction.put("attachments", cbWithAttachments.isChecked());
break;
case EntityRule.TYPE_SOUND:

@ -859,6 +859,15 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbAnswerSubject" />
<CheckBox
android:id="@+id/cbWithAttachments"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_rule_with_attachments"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbOriginalText" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvTo"
android:layout_width="wrap_content"
@ -868,7 +877,7 @@
android:text="@string/title_rule_forward_to"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbOriginalText" />
app:layout_constraintTop_toBottomOf="@id/cbWithAttachments" />
<eu.faircode.email.EditTextPlain
android:id="@+id/etTo"
@ -902,15 +911,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etTo" />
<CheckBox
android:id="@+id/cbWithAttachments"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_rule_with_attachments"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbCc" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvAnswerRemark"
android:layout_width="0dp"
@ -920,7 +920,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbWithAttachments" />
app:layout_constraintTop_toBottomOf="@id/cbCc" />
<Button
android:id="@+id/btnTtsSetup"
@ -1084,7 +1084,7 @@
android:id="@+id/grpAnswer"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="tvAnswerIdentity,spIdent,tvAnswerTemplate,spAnswer,cbAnswerSubject,cbOriginalText,tvTo,etTo,ibTo,cbCc,cbWithAttachments,tvAnswerRemark" />
app:constraint_referenced_ids="tvAnswerIdentity,spIdent,tvAnswerTemplate,spAnswer,cbAnswerSubject,cbOriginalText,cbWithAttachments,tvTo,etTo,ibTo,cbCc,tvAnswerRemark" />
<androidx.constraintlayout.widget.Group
android:id="@+id/grpTts"

Loading…
Cancel
Save