Added no identities warning

pull/154/head
M66B 6 years ago
parent 3436448855
commit c2156b33fd

@ -61,6 +61,7 @@ public class FragmentSetup extends FragmentBase {
private TextView tvIdentityDone;
private Button btnIdentity;
private TextView tvNoIdentities;
private TextView tvPermissionsDone;
private Button btnPermissions;
@ -102,6 +103,7 @@ public class FragmentSetup extends FragmentBase {
tvIdentityDone = view.findViewById(R.id.tvIdentityDone);
btnIdentity = view.findViewById(R.id.btnIdentity);
tvNoIdentities = view.findViewById(R.id.tvNoIdentities);
tvPermissionsDone = view.findViewById(R.id.tvPermissionsDone);
btnPermissions = view.findViewById(R.id.btnPermissions);
@ -208,6 +210,7 @@ public class FragmentSetup extends FragmentBase {
tvIdentityDone.setText(null);
tvIdentityDone.setCompoundDrawables(null, null, null, null);
btnIdentity.setEnabled(false);
tvNoIdentities.setVisibility(View.GONE);
tvPermissionsDone.setText(null);
tvPermissionsDone.setCompoundDrawables(null, null, null, null);
@ -300,6 +303,7 @@ public class FragmentSetup extends FragmentBase {
tvIdentityDone.setText(done ? R.string.title_setup_done : R.string.title_setup_to_do);
tvIdentityDone.setTextColor(done ? textColorPrimary : colorWarning);
tvIdentityDone.setCompoundDrawablesWithIntrinsicBounds(done ? check : null, null, null, null);
tvNoIdentities.setVisibility(done ? View.GONE : View.VISIBLE);
}
});

@ -192,6 +192,18 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tvIdentityDone" />
<TextView
android:id="@+id/tvNoIdentities"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_no_identities"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?attr/colorWarning"
android:textIsSelectable="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnIdentity" />
<!-- permissions -->
<View
@ -201,7 +213,7 @@
android:layout_marginTop="12dp"
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnIdentity" />
app:layout_constraintTop_toBottomOf="@id/tvNoIdentities" />
<ImageView
android:id="@+id/three"

@ -271,6 +271,7 @@
<string name="title_no_password">Password missing</string>
<string name="title_no_inbox">Inbox not found</string>
<string name="title_no_primary_drafts">No primary account or no drafts folder</string>
<string name="title_no_identities">Sending emails requires at least one identity</string>
<string name="title_no_idle">This provider does not support push messages. This will delay reception of new messages and increase battery usage.</string>
<string name="title_no_utf8">This provider does not support UTF-8</string>
<string name="title_no_sync">Synchronization errors since %1$s</string>

Loading…
Cancel
Save