Revise identity layout

pull/147/head
M66B 6 years ago
parent ea177d5a61
commit 7590a6ffae

@ -49,15 +49,13 @@ public class EntityIdentity {
public String name;
@NonNull
public String email;
public String display;
public String replyto;
public String bcc;
@NonNull
public Boolean delivery_receipt;
@NonNull
public Boolean read_receipt;
@NonNull
public Long account;
public String display;
public Integer color;
public String signature;
@NonNull
public Integer auth_type;
@NonNull
public String host; // SMTP
@NonNull
@ -71,15 +69,17 @@ public class EntityIdentity {
@NonNull
public String password;
@NonNull
public Integer auth_type;
public Boolean synchronize;
@NonNull
public Boolean primary;
public Integer color;
public String signature;
public String replyto;
public String bcc;
@NonNull
public Boolean synchronize;
public Boolean delivery_receipt;
@NonNull
public Boolean read_receipt;
@NonNull
public Boolean store_sent;
public Boolean store_sent = false; // obsolete
public Long sent_folder;
public Boolean tbd;
public String state;
@ -88,25 +88,26 @@ public class EntityIdentity {
public JSONObject toJSON() throws JSONException {
JSONObject json = new JSONObject();
json.put("name", name);
json.put("display", display);
json.put("email", email);
json.put("replyto", replyto);
json.put("bcc", bcc);
json.put("delivery_receipt", delivery_receipt);
json.put("read_receipt", read_receipt);
json.put("display", display);
if (color != null)
json.put("color", color);
json.put("signature", signature);
// not account
json.put("auth_type", auth_type);
json.put("host", host);
json.put("starttls", starttls);
json.put("insecure", insecure);
json.put("port", port);
json.put("user", user);
json.put("password", password);
json.put("auth_type", auth_type);
json.put("primary", primary);
if (color != null)
json.put("color", color);
json.put("signature", signature);
json.put("synchronize", synchronize);
json.put("primary", primary);
json.put("replyto", replyto);
json.put("bcc", bcc);
json.put("delivery_receipt", delivery_receipt);
json.put("read_receipt", read_receipt);
json.put("store_sent", store_sent);
if (sent_folder != null)
json.put("sent_folder", sent_folder);
@ -118,11 +119,26 @@ public class EntityIdentity {
public static EntityIdentity fromJSON(JSONObject json) throws JSONException {
EntityIdentity identity = new EntityIdentity();
identity.name = json.getString("name");
identity.email = json.getString("email");
if (json.has("display"))
identity.display = json.getString("display");
identity.email = json.getString("email");
if (json.has("color"))
identity.color = json.getInt("color");
if (json.has("signature"))
identity.signature = json.getString("signature");
identity.auth_type = json.getInt("auth_type");
identity.host = json.getString("host");
identity.starttls = json.getBoolean("starttls");
identity.insecure = (json.has("insecure") && json.getBoolean("insecure"));
identity.port = json.getInt("port");
identity.user = json.getString("user");
identity.password = json.getString("password");
identity.synchronize = json.getBoolean("synchronize");
identity.primary = json.getBoolean("primary");
if (json.has("replyto"))
identity.replyto = json.getString("replyto");
@ -140,22 +156,8 @@ public class EntityIdentity {
else
identity.read_receipt = false;
identity.host = json.getString("host");
identity.starttls = json.getBoolean("starttls");
identity.insecure = (json.has("insecure") && json.getBoolean("insecure"));
identity.port = json.getInt("port");
identity.user = json.getString("user");
identity.password = json.getString("password");
identity.auth_type = json.getInt("auth_type");
identity.primary = json.getBoolean("primary");
if (json.has("color"))
identity.color = json.getInt("color");
if (json.has("signature"))
identity.signature = json.getString("signature");
identity.synchronize = json.getBoolean("synchronize");
identity.store_sent = json.getBoolean("store_sent");
if (json.has("store_sent"))
identity.store_sent = json.getBoolean("store_sent");
if (json.has("sent_folder"))
identity.sent_folder = json.getLong("sent_folder");
@ -169,19 +171,21 @@ public class EntityIdentity {
EntityIdentity other = (EntityIdentity) obj;
return (this.name.equals(other.name) &&
this.email.equals(other.email) &&
(this.replyto == null ? other.replyto == null : this.replyto.equals(other.replyto)) &&
this.account.equals(other.account) &&
(this.display == null ? other.display == null : this.display.equals(other.display)) &&
(this.color == null ? other.color == null : this.color.equals(other.color)) &&
(this.signature == null ? other.signature == null : this.signature.equals(other.signature)) &&
this.host.equals(other.host) &&
this.starttls.equals(other.starttls) &&
this.insecure.equals(other.insecure) &&
this.port.equals(other.port) &&
this.user.equals(other.user) &&
this.password.equals(other.password) &&
this.primary.equals(other.primary) &&
(this.color == null ? other.color == null : this.color.equals(other.color)) &&
(this.signature == null ? other.signature == null : this.signature.equals(other.signature)) &&
this.synchronize.equals(other.synchronize) &&
this.store_sent.equals(other.store_sent) &&
this.primary.equals(other.primary) &&
(this.replyto == null ? other.replyto == null : this.replyto.equals(other.replyto)) &&
this.delivery_receipt.equals(other.delivery_receipt) &&
this.read_receipt.equals(other.read_receipt) &&
(this.sent_folder == null ? other.sent_folder == null : this.sent_folder.equals(other.sent_folder)) &&
(this.tbd == null ? other.tbd == null : this.tbd.equals(other.tbd)) &&
(this.state == null ? other.state == null : this.state.equals(other.state)) &&

@ -27,8 +27,10 @@ import android.graphics.drawable.GradientDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.text.Editable;
import android.text.Html;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Patterns;
import android.view.LayoutInflater;
import android.view.Menu;
@ -47,6 +49,7 @@ import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.ScrollView;
import android.widget.Spinner;
import android.widget.TextView;
import com.android.colorpicker.ColorPickerDialog;
import com.android.colorpicker.ColorPickerSwatch;
@ -73,15 +76,21 @@ import androidx.fragment.app.FragmentTransaction;
public class FragmentIdentity extends FragmentEx {
private ViewGroup view;
private EditText etName;
private EditText etEmail;
private EditText etDisplay;
private Spinner spAccount;
private EditText etDisplay;
private Button btnColor;
private View vwColor;
private ImageView ibColorDefault;
private EditText etSignature;
private ImageButton ibPro;
private Button btnAdvanced;
private EditText etReplyTo;
private EditText etBcc;
private CheckBox cbDeliveryReceipt;
private CheckBox cbReadReceipt;
private TextView tvProvider;
private Spinner spProvider;
private EditText etDomain;
private Button btnAutoConfig;
@ -92,19 +101,19 @@ public class FragmentIdentity extends FragmentEx {
private EditText etUser;
private TextInputLayout tilPassword;
private Button btnColor;
private View vwColor;
private ImageView ibColorDefault;
private EditText etSignature;
private ImageButton ibPro;
private CheckBox cbSynchronize;
private CheckBox cbPrimary;
private EditText etReplyTo;
private EditText etBcc;
private CheckBox cbDeliveryReceipt;
private CheckBox cbReadReceipt;
private Spinner spSent;
private Button btnSave;
private ProgressBar pbSave;
private ProgressBar pbWait;
private Group grpAdvanced;
private long id = -1;
@ -135,19 +144,18 @@ public class FragmentIdentity extends FragmentEx {
etName = view.findViewById(R.id.etName);
etEmail = view.findViewById(R.id.etEmail);
spAccount = view.findViewById(R.id.spAccount);
btnAdvanced = view.findViewById(R.id.btnAdvanced);
etDisplay = view.findViewById(R.id.etDisplay);
etReplyTo = view.findViewById(R.id.etReplyTo);
etBcc = view.findViewById(R.id.etBcc);
cbDeliveryReceipt = view.findViewById(R.id.cbDeliveryReceipt);
cbReadReceipt = view.findViewById(R.id.cbReadReceipt);
btnColor = view.findViewById(R.id.btnColor);
vwColor = view.findViewById(R.id.vwColor);
ibColorDefault = view.findViewById(R.id.ibColorDefault);
etSignature = view.findViewById(R.id.etSignature);
ibPro = view.findViewById(R.id.ibPro);
btnAdvanced = view.findViewById(R.id.btnAdvanced);
tvProvider = view.findViewById(R.id.tvProvider);
spProvider = view.findViewById(R.id.spProvider);
etDomain = view.findViewById(R.id.etDomain);
btnAutoConfig = view.findViewById(R.id.btnAutoConfig);
etHost = view.findViewById(R.id.etHost);
cbStartTls = view.findViewById(R.id.cbStartTls);
cbInsecure = view.findViewById(R.id.cbInsecure);
@ -155,19 +163,19 @@ public class FragmentIdentity extends FragmentEx {
etUser = view.findViewById(R.id.etUser);
tilPassword = view.findViewById(R.id.tilPassword);
btnColor = view.findViewById(R.id.btnColor);
vwColor = view.findViewById(R.id.vwColor);
ibColorDefault = view.findViewById(R.id.ibColorDefault);
etSignature = view.findViewById(R.id.etSignature);
ibPro = view.findViewById(R.id.ibPro);
cbSynchronize = view.findViewById(R.id.cbSynchronize);
cbPrimary = view.findViewById(R.id.cbPrimary);
etReplyTo = view.findViewById(R.id.etReplyTo);
etBcc = view.findViewById(R.id.etBcc);
cbDeliveryReceipt = view.findViewById(R.id.cbDeliveryReceipt);
cbReadReceipt = view.findViewById(R.id.cbReadReceipt);
spSent = view.findViewById(R.id.spSent);
btnSave = view.findViewById(R.id.btnSave);
pbSave = view.findViewById(R.id.pbSave);
pbWait = view.findViewById(R.id.pbWait);
grpAdvanced = view.findViewById(R.id.grpAdvanced);
// Wire controls
@ -229,6 +237,63 @@ public class FragmentIdentity extends FragmentEx {
}
});
vwColor.setBackgroundColor(color);
btnColor.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (Helper.isPro(getContext())) {
int[] colors = getContext().getResources().getIntArray(R.array.colorPicker);
ColorPickerDialog colorPickerDialog = new ColorPickerDialog();
colorPickerDialog.initialize(R.string.title_account_color, colors, color, 4, colors.length);
colorPickerDialog.setOnColorSelectedListener(new ColorPickerSwatch.OnColorSelectedListener() {
@Override
public void onColorSelected(int color) {
setColor(color);
}
});
colorPickerDialog.show(getFragmentManager(), "colorpicker");
} else {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.hide(FragmentIdentity.this);
fragmentTransaction.add(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
fragmentTransaction.commit();
}
}
});
ibColorDefault.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setColor(Color.TRANSPARENT);
}
});
ibPro.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.hide(FragmentIdentity.this);
fragmentTransaction.add(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
fragmentTransaction.commit();
}
});
btnAdvanced.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int visibility = (grpAdvanced.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
grpAdvanced.setVisibility(visibility);
cbInsecure.setVisibility(insecure ? visibility : View.GONE);
if (visibility == View.VISIBLE)
new Handler().post(new Runnable() {
@Override
public void run() {
((ScrollView) view).smoothScrollTo(0, tvProvider.getTop());
}
});
}
});
spProvider.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
@ -250,6 +315,23 @@ public class FragmentIdentity extends FragmentEx {
}
});
etDomain.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence text, int start, int before, int count) {
btnAutoConfig.setEnabled(text.length() > 0);
}
@Override
public void afterTextChanged(Editable s) {
}
});
btnAutoConfig.setEnabled(false);
btnAutoConfig.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -262,8 +344,10 @@ public class FragmentIdentity extends FragmentEx {
new SimpleTask<SRVRecord>() {
@Override
protected SRVRecord onLoad(Context context, Bundle args) throws Throwable {
String domain = args.getString("domain");
Record[] records = new Lookup("_submission._tcp." + domain, Type.SRV).run();
String dns = "_submission._tcp." + args.getString("domain");
Log.i("Lookup dns=" + dns);
Record[] records = new Lookup(dns, Type.SRV).run();
Log.i("Found dns=" + (records == null ? -1 : records.length));
if (records != null)
for (int i = 0; i < records.length; i++) {
SRVRecord srv = (SRVRecord) records[i];
@ -298,22 +382,6 @@ public class FragmentIdentity extends FragmentEx {
}
});
btnAdvanced.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int visibility = (grpAdvanced.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
grpAdvanced.setVisibility(visibility);
cbInsecure.setVisibility(insecure ? visibility : View.GONE);
if (visibility == View.VISIBLE)
new Handler().post(new Runnable() {
@Override
public void run() {
((ScrollView) view).smoothScrollTo(0, etDisplay.getTop());
}
});
}
});
cbStartTls.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@ -321,47 +389,6 @@ public class FragmentIdentity extends FragmentEx {
}
});
vwColor.setBackgroundColor(color);
btnColor.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (Helper.isPro(getContext())) {
int[] colors = getContext().getResources().getIntArray(R.array.colorPicker);
ColorPickerDialog colorPickerDialog = new ColorPickerDialog();
colorPickerDialog.initialize(R.string.title_account_color, colors, color, 4, colors.length);
colorPickerDialog.setOnColorSelectedListener(new ColorPickerSwatch.OnColorSelectedListener() {
@Override
public void onColorSelected(int color) {
setColor(color);
}
});
colorPickerDialog.show(getFragmentManager(), "colorpicker");
} else {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.hide(FragmentIdentity.this);
fragmentTransaction.add(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
fragmentTransaction.commit();
}
}
});
ibColorDefault.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setColor(Color.TRANSPARENT);
}
});
ibPro.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.hide(FragmentIdentity.this);
fragmentTransaction.add(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
fragmentTransaction.commit();
}
});
cbSynchronize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@ -406,24 +433,27 @@ public class FragmentIdentity extends FragmentEx {
protected Void onLoad(Context context, Bundle args) throws Throwable {
long id = args.getLong("id");
String name = args.getString("name");
String email = args.getString("email");
long account = args.getLong("account");
String display = args.getString("display");
String email = args.getString("email");
String replyto = args.getString("replyto");
String bcc = args.getString("bcc");
boolean delivery_receipt = args.getBoolean("delivery_receipt");
boolean read_receipt = args.getBoolean("read_receipt");
Integer color = args.getInt("color");
String signature = args.getString("signature");
int auth_type = args.getInt("auth_type");
String host = args.getString("host");
boolean starttls = args.getBoolean("starttls");
boolean insecure = args.getBoolean("insecure");
String port = args.getString("port");
String user = args.getString("user");
String password = args.getString("password");
Integer color = args.getInt("color");
String signature = args.getString("signature");
int auth_type = args.getInt("auth_type");
boolean synchronize = args.getBoolean("synchronize");
boolean primary = args.getBoolean("primary");
String replyto = args.getString("replyto");
String bcc = args.getString("bcc");
boolean delivery_receipt = args.getBoolean("delivery_receipt");
boolean read_receipt = args.getBoolean("read_receipt");
EntityFolder sent = (EntityFolder) args.getSerializable("sent");
if (TextUtils.isEmpty(name))
@ -495,24 +525,26 @@ public class FragmentIdentity extends FragmentEx {
if (identity == null)
identity = new EntityIdentity();
identity.name = name;
identity.email = email;
identity.account = account;
identity.display = display;
identity.email = email;
identity.replyto = replyto;
identity.bcc = bcc;
identity.delivery_receipt = delivery_receipt;
identity.read_receipt = read_receipt;
identity.color = color;
identity.signature = signature;
identity.auth_type = auth_type;
identity.host = host;
identity.starttls = starttls;
identity.insecure = insecure;
identity.port = Integer.parseInt(port);
identity.user = user;
identity.password = password;
identity.color = color;
identity.signature = signature;
identity.auth_type = auth_type;
identity.synchronize = synchronize;
identity.primary = (identity.synchronize && primary);
identity.replyto = replyto;
identity.bcc = bcc;
identity.delivery_receipt = delivery_receipt;
identity.read_receipt = read_receipt;
identity.store_sent = false;
identity.sent_folder = (sent == null ? null : sent.id);
identity.error = null;
@ -602,21 +634,24 @@ public class FragmentIdentity extends FragmentEx {
if (savedInstanceState == null) {
etName.setText(identity == null ? null : identity.name);
etEmail.setText(identity == null ? null : identity.email);
etDisplay.setText(identity == null ? null : identity.display);
etReplyTo.setText(identity == null ? null : identity.replyto);
etBcc.setText(identity == null ? null : identity.bcc);
cbDeliveryReceipt.setChecked(identity == null ? false : identity.delivery_receipt);
cbReadReceipt.setChecked(identity == null ? false : identity.read_receipt);
etSignature.setText(identity == null || identity.signature == null ? null : Html.fromHtml(identity.signature));
etHost.setText(identity == null ? null : identity.host);
cbStartTls.setChecked(identity == null ? false : identity.starttls);
cbInsecure.setChecked(identity == null ? false : identity.insecure);
etPort.setText(identity == null ? null : Long.toString(identity.port));
etUser.setText(identity == null ? null : identity.user);
tilPassword.getEditText().setText(identity == null ? null : identity.password);
etSignature.setText(identity == null || identity.signature == null ? null : Html.fromHtml(identity.signature));
cbSynchronize.setChecked(identity == null ? true : identity.synchronize);
cbPrimary.setChecked(identity == null ? true : identity.primary);
etReplyTo.setText(identity == null ? null : identity.replyto);
etBcc.setText(identity == null ? null : identity.bcc);
cbDeliveryReceipt.setChecked(identity == null ? false : identity.delivery_receipt);
cbReadReceipt.setChecked(identity == null ? false : identity.read_receipt);
color = (identity == null || identity.color == null ? Color.TRANSPARENT : identity.color);
etName.requestFocus();

@ -72,20 +72,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvAccount" />
<Button
android:id="@+id/btnAdvanced"
style="@style/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/title_setup_advanced"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/spAccount" />
<!-- email -->
<TextView
android:id="@+id/tvDisplay"
android:layout_width="wrap_content"
@ -95,7 +81,7 @@
android:text="@string/title_display_name"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnAdvanced" />
app:layout_constraintTop_toBottomOf="@id/spAccount" />
<EditText
android:id="@+id/etDisplay"
@ -107,78 +93,81 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDisplay" />
<!-- reply to -->
<TextView
android:id="@+id/tvReplyTo"
<Button
android:id="@+id/btnColor"
style="@style/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_identity_reply_to"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/title_account_color"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etDisplay" />
<EditText
android:id="@+id/etReplyTo"
android:layout_width="match_parent"
<View
android:id="@+id/vwColor"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="12dp"
android:background="@color/colorAccent"
app:layout_constraintBottom_toBottomOf="@id/btnColor"
app:layout_constraintStart_toEndOf="@id/btnColor"
app:layout_constraintTop_toTopOf="@id/btnColor" />
<ImageView
android:id="@+id/ibColorDefault"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autofillHints="emailAddress"
android:hint="@string/title_optional"
android:inputType="textEmailAddress"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvReplyTo" />
android:layout_marginStart="12dp"
android:src="@drawable/baseline_delete_24"
app:layout_constraintBottom_toBottomOf="@id/btnColor"
app:layout_constraintStart_toEndOf="@id/vwColor"
app:layout_constraintTop_toTopOf="@id/btnColor" />
<TextView
android:id="@+id/tvBcc"
android:id="@+id/tvSignature"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_bcc"
android:text="@string/title_account_signature"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etReplyTo" />
app:layout_constraintTop_toBottomOf="@id/btnColor" />
<EditText
android:id="@+id/etBcc"
android:layout_width="match_parent"
android:id="@+id/etSignature"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:autofillHints="emailAddress"
android:fontFamily="monospace"
android:hint="@string/title_optional"
android:inputType="textEmailAddress"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvBcc" />
<CheckBox
android:id="@+id/cbDeliveryReceipt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_identity_delivery_receipt"
android:inputType="textCapSentences|textMultiLine"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toStartOf="@+id/ibPro"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etBcc" />
app:layout_constraintTop_toBottomOf="@id/tvSignature" />
<CheckBox
android:id="@+id/cbReadReceipt"
<ImageButton
android:id="@+id/ibPro"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_identity_read_receipt"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDeliveryReceipt" />
android:layout_marginStart="6dp"
android:src="@drawable/baseline_info_24"
app:layout_constraintBottom_toBottomOf="@id/etSignature"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/etSignature" />
<TextView
android:id="@+id/tvReceipt"
<Button
android:id="@+id/btnAdvanced"
style="@style/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_identity_receipt_remark"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/title_setup_advanced"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbReadReceipt" />
app:layout_constraintTop_toBottomOf="@id/etSignature" />
<!--- provider -->
@ -190,7 +179,7 @@
android:text="@string/title_provider"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvReceipt" />
app:layout_constraintTop_toBottomOf="@id/btnAdvanced" />
<Spinner
android:id="@+id/spProvider"
@ -309,7 +298,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPort" />
<!-- password -->
<!-- username -->
<TextView
android:id="@+id/tvUser"
@ -361,87 +350,96 @@
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/btnColor"
style="@style/buttonStyleSmall"
<CheckBox
android:id="@+id/cbSynchronize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/title_account_color"
android:text="@string/title_synchronize_identity"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tilPassword" />
<View
android:id="@+id/vwColor"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="12dp"
android:background="@color/colorAccent"
app:layout_constraintBottom_toBottomOf="@id/btnColor"
app:layout_constraintStart_toEndOf="@id/btnColor"
app:layout_constraintTop_toTopOf="@id/btnColor" />
<ImageView
android:id="@+id/ibColorDefault"
<CheckBox
android:id="@+id/cbPrimary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:src="@drawable/baseline_delete_24"
app:layout_constraintBottom_toBottomOf="@id/btnColor"
app:layout_constraintStart_toEndOf="@id/vwColor"
app:layout_constraintTop_toTopOf="@id/btnColor" />
android:layout_marginTop="12dp"
android:text="@string/title_primary_identity"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbSynchronize" />
<!-- reply to -->
<TextView
android:id="@+id/tvSignature"
android:id="@+id/tvReplyTo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_account_signature"
android:text="@string/title_identity_reply_to"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnColor" />
app:layout_constraintTop_toBottomOf="@id/cbPrimary" />
<EditText
android:id="@+id/etSignature"
android:layout_width="0dp"
android:id="@+id/etReplyTo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="monospace"
android:autofillHints="emailAddress"
android:hint="@string/title_optional"
android:inputType="textCapSentences|textMultiLine"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toStartOf="@+id/ibPro"
android:inputType="textEmailAddress"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSignature" />
app:layout_constraintTop_toBottomOf="@id/tvReplyTo" />
<ImageButton
android:id="@+id/ibPro"
<TextView
android:id="@+id/tvBcc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:src="@drawable/baseline_info_24"
app:layout_constraintBottom_toBottomOf="@id/etSignature"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/etSignature" />
android:layout_marginTop="12dp"
android:text="@string/title_bcc"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etReplyTo" />
<EditText
android:id="@+id/etBcc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="emailAddress"
android:hint="@string/title_optional"
android:inputType="textEmailAddress"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvBcc" />
<CheckBox
android:id="@+id/cbSynchronize"
android:id="@+id/cbDeliveryReceipt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_synchronize_identity"
android:text="@string/title_identity_delivery_receipt"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etSignature" />
app:layout_constraintTop_toBottomOf="@id/etBcc" />
<CheckBox
android:id="@+id/cbPrimary"
android:id="@+id/cbReadReceipt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_primary_identity"
android:text="@string/title_identity_read_receipt"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbSynchronize" />
app:layout_constraintTop_toBottomOf="@id/cbDeliveryReceipt" />
<TextView
android:id="@+id/tvReceipt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_identity_receipt_remark"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbReadReceipt" />
<TextView
android:id="@+id/tvSent"
@ -451,7 +449,7 @@
android:text="@string/title_store_copy"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbPrimary" />
app:layout_constraintTop_toBottomOf="@id/tvReceipt" />
<Spinner
android:id="@+id/spSent"
@ -506,6 +504,6 @@
android:id="@+id/grpAdvanced"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="tvDisplay,etDisplay,tvReplyTo,etReplyTo,tvBcc,etBcc,cbDeliveryReceipt,cbReadReceipt,tvReceipt,tvProvider,spProvider,tvDomain,etDomain,btnAutoConfig,tvSmtp,tvHost,etHost,cbStartTls,tvPort,etPort,tvUser,etUser,tvPassword,tilPassword,btnColor,vwColor,ibColorDefault,tvSignature,etSignature,ibPro,cbSynchronize,cbPrimary,tvSent,spSent,tvSentHint" />
app:constraint_referenced_ids="tvReplyTo,etReplyTo,tvBcc,etBcc,cbDeliveryReceipt,cbReadReceipt,tvReceipt,tvProvider,spProvider,tvDomain,etDomain,btnAutoConfig,tvSmtp,tvHost,etHost,cbStartTls,tvPort,etPort,tvUser,etUser,tvPassword,tilPassword,cbSynchronize,cbPrimary,tvSent,spSent,tvSentHint" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

Loading…
Cancel
Save