Added spinner for auto discovery

pull/161/head
M66B 5 years ago
parent bfd72ef25e
commit 22309e6939

@ -81,6 +81,7 @@ public class FragmentAccount extends FragmentBase {
private EditText etDomain;
private Button btnAutoConfig;
private ContentLoadingProgressBar pbAutoConfig;
private EditText etHost;
private RadioGroup rgEncryption;
@ -172,6 +173,7 @@ public class FragmentAccount extends FragmentBase {
etDomain = view.findViewById(R.id.etDomain);
btnAutoConfig = view.findViewById(R.id.btnAutoConfig);
pbAutoConfig = view.findViewById(R.id.pbAutoConfig);
etHost = view.findViewById(R.id.etHost);
etPort = view.findViewById(R.id.etPort);
@ -394,6 +396,7 @@ public class FragmentAccount extends FragmentBase {
Helper.setViewsEnabled(view, false);
btnAutoConfig.setEnabled(false);
pbAutoConfig.setVisibility(View.GONE);
rgEncryption.setVisibility(View.GONE);
cbInsecure.setVisibility(View.GONE);
@ -432,12 +435,14 @@ public class FragmentAccount extends FragmentBase {
protected void onPreExecute(Bundle args) {
etDomain.setEnabled(false);
btnAutoConfig.setEnabled(false);
pbAutoConfig.setVisibility(View.VISIBLE);
}
@Override
protected void onPostExecute(Bundle args) {
etDomain.setEnabled(true);
btnAutoConfig.setEnabled(true);
pbAutoConfig.setVisibility(View.GONE);
}
@Override

@ -92,6 +92,7 @@ public class FragmentIdentity extends FragmentBase {
private Spinner spProvider;
private EditText etDomain;
private Button btnAutoConfig;
private ContentLoadingProgressBar pbAutoConfig;
private EditText etHost;
private RadioGroup rgEncryption;
private CheckBox cbInsecure;
@ -171,6 +172,7 @@ public class FragmentIdentity extends FragmentBase {
etDomain = view.findViewById(R.id.etDomain);
btnAutoConfig = view.findViewById(R.id.btnAutoConfig);
pbAutoConfig = view.findViewById(R.id.pbAutoConfig);
etHost = view.findViewById(R.id.etHost);
rgEncryption = view.findViewById(R.id.rgEncryption);
@ -430,6 +432,7 @@ public class FragmentIdentity extends FragmentBase {
// Initialize
Helper.setViewsEnabled(view, false);
btnAutoConfig.setEnabled(false);
pbAutoConfig.setVisibility(View.GONE);
cbInsecure.setVisibility(View.GONE);
tilPassword.setEndIconMode(id < 0 ? END_ICON_PASSWORD_TOGGLE : END_ICON_NONE);
@ -461,12 +464,14 @@ public class FragmentIdentity extends FragmentBase {
protected void onPreExecute(Bundle args) {
etDomain.setEnabled(false);
btnAutoConfig.setEnabled(false);
pbAutoConfig.setVisibility(View.VISIBLE);
}
@Override
protected void onPostExecute(Bundle args) {
etDomain.setEnabled(true);
btnAutoConfig.setEnabled(true);
pbAutoConfig.setVisibility(View.GONE);
}
@Override

@ -85,6 +85,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etDomain" />
<eu.faircode.email.ContentLoadingProgressBar
android:id="@+id/pbAutoConfig"
style="@style/Base.Widget.AppCompat.ProgressBar"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="12dp"
android:indeterminate="true"
app:layout_constraintBottom_toBottomOf="@id/btnAutoConfig"
app:layout_constraintStart_toEndOf="@id/btnAutoConfig"
app:layout_constraintTop_toTopOf="@id/btnAutoConfig" />
<!-- IMAP/POP3 -->
<TextView

@ -286,6 +286,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etDomain" />
<eu.faircode.email.ContentLoadingProgressBar
android:id="@+id/pbAutoConfig"
style="@style/Base.Widget.AppCompat.ProgressBar"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="12dp"
android:indeterminate="true"
app:layout_constraintBottom_toBottomOf="@id/btnAutoConfig"
app:layout_constraintStart_toEndOf="@id/btnAutoConfig"
app:layout_constraintTop_toTopOf="@id/btnAutoConfig" />
<TextView
android:id="@+id/tvSmtp"
android:layout_width="wrap_content"

Loading…
Cancel
Save