diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index 18c2f60717..684f311c2c 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -68,6 +68,8 @@ public class FragmentSetup extends FragmentEx { private Button btnData; + private int textColorPrimary; + private int colorWarning; private Drawable check; private static final String[] permissions = new String[]{ @@ -79,6 +81,8 @@ public class FragmentSetup extends FragmentEx { public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { setSubtitle(R.string.title_setup); + textColorPrimary = Helper.resolveColor(getContext(), android.R.attr.textColorPrimary); + colorWarning = Helper.resolveColor(getContext(), R.attr.colorWarning); check = getResources().getDrawable(R.drawable.baseline_check_24, getContext().getTheme()); view = (ViewGroup) inflater.inflate(R.layout.fragment_setup, container, false); @@ -249,6 +253,7 @@ public class FragmentSetup extends FragmentEx { btnIdentity.setEnabled(done); tvAccountDone.setText(done ? R.string.title_setup_done : R.string.title_setup_to_do); + tvAccountDone.setTextColor(done ? textColorPrimary : colorWarning); tvAccountDone.setCompoundDrawablesWithIntrinsicBounds(done ? check : null, null, null, null); if (livePrimaryDrafts == null) @@ -288,6 +293,7 @@ public class FragmentSetup extends FragmentEx { public void onChanged(@Nullable List identities) { boolean done = (identities != null && identities.size() > 0); 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); } }); @@ -307,6 +313,7 @@ public class FragmentSetup extends FragmentEx { } btnDoze.setEnabled(!ignoring); tvDozeDone.setText(ignoring ? R.string.title_setup_done : R.string.title_setup_to_do); + tvDozeDone.setTextColor(ignoring ? textColorPrimary : colorWarning); tvDozeDone.setCompoundDrawablesWithIntrinsicBounds(ignoring ? check : null, null, null, null); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { @@ -332,6 +339,7 @@ public class FragmentSetup extends FragmentEx { btnPermissions.setEnabled(!has); tvPermissionsDone.setText(has ? R.string.title_setup_done : R.string.title_setup_to_do); + tvPermissionsDone.setTextColor(has ? textColorPrimary : colorWarning); tvPermissionsDone.setCompoundDrawablesWithIntrinsicBounds(has ? check : null, null, null, null); if (has && !init) diff --git a/app/src/main/res/layout/fragment_setup.xml b/app/src/main/res/layout/fragment_setup.xml index 4f5e430db8..2762b98882 100644 --- a/app/src/main/res/layout/fragment_setup.xml +++ b/app/src/main/res/layout/fragment_setup.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_margin="6dp" + android:layout_margin="12dp" android:orientation="vertical" tools:context=".ActivitySetup"> @@ -16,7 +16,6 @@ android:id="@+id/btnQuick" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="12dp" android:text="@string/title_setup_quick" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent"