1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

Gmail app password

This commit is contained in:
M66B 2020-12-02 19:07:34 +01:00
parent 125c7066ff
commit 7cdbe48ff1
3 changed files with 26 additions and 1 deletions

View file

@ -29,6 +29,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Paint;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
@ -73,6 +74,8 @@ public class FragmentGmail extends FragmentBase {
private Button btnSelect;
private ContentLoadingProgressBar pbSelect;
private TextView tvAppPassword;
private TextView tvError;
private Button btnSupport;
@ -95,6 +98,8 @@ public class FragmentGmail extends FragmentBase {
btnSelect = view.findViewById(R.id.btnSelect);
pbSelect = view.findViewById(R.id.pbSelect);
tvAppPassword = view.findViewById(R.id.tvAppPassword);
tvError = view.findViewById(R.id.tvError);
btnSupport = view.findViewById(R.id.btnSupport);
@ -143,6 +148,14 @@ public class FragmentGmail extends FragmentBase {
}
});
tvAppPassword.setPaintFlags(tvAppPassword.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
tvAppPassword.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.viewFAQ(v.getContext(), 6);
}
});
btnSupport.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

View file

@ -104,6 +104,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnSelect" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvAppPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_setup_gmail_password"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSelectHint" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvErrorTitle"
android:layout_width="wrap_content"
@ -113,7 +124,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSelectHint" />
app:layout_constraintTop_toBottomOf="@id/tvAppPassword" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvError"

View file

@ -179,6 +179,7 @@
<string name="title_setup_gmail_rationale">Please grant permissions to select an account and read your name</string>
<string name="title_setup_gmail_permissions">Google will ask for permissions to read, compose, send and permanently delete all your email. FairEmail will never delete your messages without your explicit consent.</string>
<string name="title_setup_gmail_drafts">If the drafts folder is not accessible by IMAP, this can be fixed in the Gmail label settings</string>
<string name="title_setup_gmail_password">I want to authorize an account with a password</string>
<string name="title_setup_office_remark">Microsoft does not provide this type of authorization for Outlook, Live, Hotmail, etc accounts</string>
<string name="title_setup_office_auth">The error \'AUTHENTICATE failed\' can be caused by IMAP/SMTP being disabled by the system administrator</string>
<string name="title_setup_oauth_rationale">Authorize access to your %1$s account</string>