Added POP3 hint

pull/147/head
M66B 6 years ago
parent deff5c4a75
commit 212c73f6d9

@ -94,6 +94,7 @@ public class FragmentAccount extends FragmentBase {
private Button btnAuthorize;
private SwitchCompat swPop;
private TextView tvPopHint;
private EditText etHost;
private CheckBox cbStartTls;
private CheckBox cbInsecure;
@ -171,6 +172,7 @@ public class FragmentAccount extends FragmentBase {
btnAuthorize = view.findViewById(R.id.btnAuthorize);
swPop = view.findViewById(R.id.swPop);
tvPopHint = view.findViewById(R.id.tvPopHint);
etHost = view.findViewById(R.id.etHost);
etPort = view.findViewById(R.id.etPort);
cbStartTls = view.findViewById(R.id.cbStartTls);
@ -296,6 +298,7 @@ public class FragmentAccount extends FragmentBase {
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
boolean starttls = cbStartTls.isChecked();
if (isChecked) {
tvPopHint.setVisibility(View.VISIBLE);
etHost.setHint("pop.domain.tld");
etPort.setHint(starttls ? "110" : "995");
etRealm.setText(null);
@ -304,6 +307,7 @@ public class FragmentAccount extends FragmentBase {
btnCheck.setVisibility(View.GONE);
btnSave.setVisibility(View.VISIBLE);
} else {
tvPopHint.setVisibility(View.GONE);
etHost.setHint("imap.domain.tld");
etPort.setHint(starttls ? "143" : "993");
btnCheck.setVisibility(View.VISIBLE);
@ -461,6 +465,8 @@ public class FragmentAccount extends FragmentBase {
btnAutoConfig.setEnabled(false);
tvPopHint.setVisibility(View.GONE);
btnAuthorize.setVisibility(View.GONE);
cbStartTls.setVisibility(View.GONE);
cbInsecure.setVisibility(View.GONE);

@ -46,6 +46,7 @@
android:id="@+id/tvDomainHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/title_optional"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
@ -107,6 +108,17 @@
app:layout_constraintStart_toEndOf="@id/swPop"
app:layout_constraintTop_toTopOf="@id/swPop" />
<TextView
android:id="@+id/tvPopHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/title_pop3_hint"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swPop" />
<!-- host -->
<TextView
@ -117,7 +129,7 @@
android:text="@string/title_host"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swPop" />
app:layout_constraintTop_toBottomOf="@id/tvPopHint" />
<EditText
android:id="@+id/etHost"

@ -249,9 +249,9 @@
<string name="title_drafts_required">A drafts folder is required to send messages</string>
<string name="title_account_delete">Delete this account permanently?</string>
<string name="title_identity_delete">Delete this identity permanently?</string>
<string name="title_pop">POP is not supported</string>
<string name="title_edit_html">Edit as HTML</string>
<string name="title_last_connected">Last connected: %1$s</string>
<string name="title_pop3_hint">POP3 has significant limitations, so use IMAP whenever possible</string>
<string name="title_unseen_count" translatable="false">%1$s (%2$d)</string>

Loading…
Cancel
Save