mirror of https://github.com/M66B/FairEmail.git
Show oauth authorized
This commit is contained in:
parent
76c297fabe
commit
ac27c9bb80
|
@ -77,6 +77,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
||||
private View view;
|
||||
private View vwColor;
|
||||
private ImageView ivOAuth;
|
||||
private ImageView ivPrimary;
|
||||
private ImageView ivNotify;
|
||||
private TextView tvName;
|
||||
|
@ -100,6 +101,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|||
view = itemView.findViewById(R.id.clItem);
|
||||
vwColor = itemView.findViewById(R.id.vwColor);
|
||||
ivSync = itemView.findViewById(R.id.ivSync);
|
||||
ivOAuth = itemView.findViewById(R.id.ivOAuth);
|
||||
ivPrimary = itemView.findViewById(R.id.ivPrimary);
|
||||
ivNotify = itemView.findViewById(R.id.ivNotify);
|
||||
tvName = itemView.findViewById(R.id.tvName);
|
||||
|
@ -134,6 +136,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|||
|
||||
ivSync.setImageResource(account.synchronize ? R.drawable.baseline_sync_24 : R.drawable.baseline_sync_disabled_24);
|
||||
|
||||
ivOAuth.setVisibility(account.auth_type == MailService.AUTH_TYPE_PASSWORD ? View.GONE : View.VISIBLE);
|
||||
ivPrimary.setVisibility(account.primary ? View.VISIBLE : View.GONE);
|
||||
ivNotify.setVisibility(account.notify ? View.VISIBLE : View.GONE);
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,1L3,5v6c0,5.55 3.84,10.74 9,12 5.16,-1.26 9,-6.45 9,-12L21,5l-9,-4zM12,11.99h7c-0.53,4.12 -3.28,7.79 -7,8.94L12,12L5,12L5,6.3l7,-3.11v8.8z"/>
|
||||
</vector>
|
|
@ -12,6 +12,28 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOAuth"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/title_legend_oauth"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/baseline_security_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOauth"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/title_legend_oauth"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivOAuth"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivOAuth"
|
||||
app:layout_constraintTop_toTopOf="@id/ivOAuth" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPrimaryConnected"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -19,7 +41,7 @@
|
|||
android:contentDescription="@string/title_legend_primary_connected"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivOAuth"
|
||||
app:srcCompat="@drawable/baseline_folder_24" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
app:srcCompat="@drawable/baseline_cloud_off_24" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPrimary"
|
||||
android:id="@+id/ivOAuth"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
|
@ -53,6 +53,17 @@
|
|||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/ivState"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName"
|
||||
app:srcCompat="@drawable/baseline_security_24" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPrimary"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:contentDescription="@string/title_legend_primary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/ivOAuth"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName"
|
||||
app:srcCompat="@drawable/baseline_star_24" />
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -823,6 +823,7 @@
|
|||
<string name="title_legend_section_messages">Messages</string>
|
||||
<string name="title_legend_section_compose">Compose</string>
|
||||
|
||||
<string name="title_legend_oauth">OAuth authorization</string>
|
||||
<string name="title_legend_primary_connected">Account connected</string>
|
||||
<string name="title_legend_primary_disconnected">Account disconnected</string>
|
||||
<string name="title_legend_download_on">Download message content automatically</string>
|
||||
|
|
Loading…
Reference in New Issue