Added remark about Gmail setup

pull/175/head
M66B 5 years ago
parent ffc262d3ed
commit ec7df34e07

@ -74,6 +74,8 @@ import java.util.Objects;
import javax.mail.Folder;
import static android.app.Activity.RESULT_OK;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static com.google.android.material.textfield.TextInputLayout.END_ICON_NONE;
import static com.google.android.material.textfield.TextInputLayout.END_ICON_PASSWORD_TOGGLE;
@ -82,6 +84,7 @@ public class FragmentAccount extends FragmentBase {
private ScrollView scroll;
private Spinner spProvider;
private TextView tvGmailHint;
private EditText etDomain;
private Button btnAutoConfig;
@ -193,6 +196,7 @@ public class FragmentAccount extends FragmentBase {
// Get controls
spProvider = view.findViewById(R.id.spProvider);
tvGmailHint = view.findViewById(R.id.tvGmailHint);
etDomain = view.findViewById(R.id.etDomain);
btnAutoConfig = view.findViewById(R.id.btnAutoConfig);
@ -267,6 +271,9 @@ public class FragmentAccount extends FragmentBase {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long itemid) {
EmailProvider provider = (EmailProvider) adapterView.getSelectedItem();
tvGmailHint.setVisibility(
auth == EmailService.AUTH_TYPE_PASSWORD && "gmail".equals(provider.id)
? VISIBLE : GONE);
grpServer.setVisibility(position > 0 ? View.VISIBLE : View.GONE);
grpAuthorize.setVisibility(position > 0 ? View.VISIBLE : View.GONE);
@ -492,6 +499,8 @@ public class FragmentAccount extends FragmentBase {
// Initialize
Helper.setViewsEnabled(view, false);
tvGmailHint.setVisibility(GONE);
btnAutoConfig.setEnabled(false);
pbAutoConfig.setVisibility(View.GONE);

@ -32,6 +32,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvProvider" />
<TextView
android:id="@+id/tvGmailHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/title_account_gmail"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/spProvider" />
<!-- auto config -->
<TextView
@ -42,7 +53,7 @@
android:text="@string/title_domain"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/spProvider" />
app:layout_constraintTop_toBottomOf="@id/tvGmailHint" />
<TextView
android:id="@+id/tvDomainHint"

@ -509,6 +509,7 @@
<string name="title_account_left">Swipe left</string>
<string name="title_account_right">Swipe right</string>
<string name="title_account_move">Default move to</string>
<string name="title_account_gmail">For reliable synchronisation of a Gmail account, the Gmail quick setup wizard should be used whenever possible</string>
<string name="title_domain">Domain name</string>
<string name="title_autoconfig">Get settings</string>
<string name="title_imap" translatable="false">IMAP</string>

Loading…
Cancel
Save