|
|
@ -136,9 +136,8 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
private ViewGroup view;
|
|
|
|
private ViewGroup view;
|
|
|
|
private Spinner spIdentity;
|
|
|
|
private Spinner spIdentity;
|
|
|
|
private TextView tvExtraPrefix;
|
|
|
|
|
|
|
|
private EditText etExtra;
|
|
|
|
private EditText etExtra;
|
|
|
|
private TextView tvExtraSuffix;
|
|
|
|
private TextView tvDomain;
|
|
|
|
private MultiAutoCompleteTextView etTo;
|
|
|
|
private MultiAutoCompleteTextView etTo;
|
|
|
|
private ImageView ivToAdd;
|
|
|
|
private ImageView ivToAdd;
|
|
|
|
private MultiAutoCompleteTextView etCc;
|
|
|
|
private MultiAutoCompleteTextView etCc;
|
|
|
@ -193,9 +192,8 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
// Get controls
|
|
|
|
// Get controls
|
|
|
|
spIdentity = view.findViewById(R.id.spIdentity);
|
|
|
|
spIdentity = view.findViewById(R.id.spIdentity);
|
|
|
|
tvExtraPrefix = view.findViewById(R.id.tvExtraPrefix);
|
|
|
|
|
|
|
|
etExtra = view.findViewById(R.id.etExtra);
|
|
|
|
etExtra = view.findViewById(R.id.etExtra);
|
|
|
|
tvExtraSuffix = view.findViewById(R.id.tvExtraSuffix);
|
|
|
|
tvDomain = view.findViewById(R.id.tvDomain);
|
|
|
|
etTo = view.findViewById(R.id.etTo);
|
|
|
|
etTo = view.findViewById(R.id.etTo);
|
|
|
|
ivToAdd = view.findViewById(R.id.ivToAdd);
|
|
|
|
ivToAdd = view.findViewById(R.id.ivToAdd);
|
|
|
|
etCc = view.findViewById(R.id.etCc);
|
|
|
|
etCc = view.findViewById(R.id.etCc);
|
|
|
@ -228,8 +226,8 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
|
|
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
|
|
|
EntityIdentity identity = (EntityIdentity) parent.getAdapter().getItem(position);
|
|
|
|
EntityIdentity identity = (EntityIdentity) parent.getAdapter().getItem(position);
|
|
|
|
int at = (identity == null ? -1 : identity.email.indexOf('@'));
|
|
|
|
int at = (identity == null ? -1 : identity.email.indexOf('@'));
|
|
|
|
tvExtraPrefix.setText(at < 0 ? null : identity.email.substring(0, at));
|
|
|
|
etExtra.setHint(at < 0 ? null : identity.email.substring(0, at));
|
|
|
|
tvExtraSuffix.setText(at < 0 ? null : identity.email.substring(at));
|
|
|
|
tvDomain.setText(at < 0 ? null : identity.email.substring(at));
|
|
|
|
Spanned signature = null;
|
|
|
|
Spanned signature = null;
|
|
|
|
if (pro) {
|
|
|
|
if (pro) {
|
|
|
|
if (identity != null && !TextUtils.isEmpty(identity.signature))
|
|
|
|
if (identity != null && !TextUtils.isEmpty(identity.signature))
|
|
|
@ -250,8 +248,8 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onNothingSelected(AdapterView<?> parent) {
|
|
|
|
public void onNothingSelected(AdapterView<?> parent) {
|
|
|
|
tvExtraPrefix.setText(null);
|
|
|
|
etExtra.setHint("");
|
|
|
|
tvExtraSuffix.setText(null);
|
|
|
|
tvDomain.setText(null);
|
|
|
|
tvSignature.setText(null);
|
|
|
|
tvSignature.setText(null);
|
|
|
|
grpSignature.setVisibility(View.GONE);
|
|
|
|
grpSignature.setVisibility(View.GONE);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -375,8 +373,8 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
// Initialize
|
|
|
|
// Initialize
|
|
|
|
setSubtitle(R.string.title_compose);
|
|
|
|
setSubtitle(R.string.title_compose);
|
|
|
|
tvExtraPrefix.setText(null);
|
|
|
|
etExtra.setHint("");
|
|
|
|
tvExtraSuffix.setText(null);
|
|
|
|
tvDomain.setText(null);
|
|
|
|
|
|
|
|
|
|
|
|
grpHeader.setVisibility(View.GONE);
|
|
|
|
grpHeader.setVisibility(View.GONE);
|
|
|
|
grpExtra.setVisibility(View.GONE);
|
|
|
|
grpExtra.setVisibility(View.GONE);
|
|
|
|