From 4b6e230c2bd8a9e6ca5577e5e2a90b7b306493e4 Mon Sep 17 00:00:00 2001 From: Distopico Vegan Date: Mon, 19 Nov 2018 23:27:42 -0500 Subject: [PATCH 1/2] fix: focus body on reply message --- .../org/dystopia/email/FragmentCompose.java | 7 ++++++- app/src/main/res/layout/fragment_compose.xml | 18 +++++++++++------- app/src/main/res/values/dimens.xml | 3 +++ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/dystopia/email/FragmentCompose.java b/app/src/main/java/org/dystopia/email/FragmentCompose.java index bbec2c03..04c0c2c3 100644 --- a/app/src/main/java/org/dystopia/email/FragmentCompose.java +++ b/app/src/main/java/org/dystopia/email/FragmentCompose.java @@ -1443,7 +1443,12 @@ public class FragmentCompose extends FragmentEx { new Runnable() { @Override public void run() { - etTo.requestFocus(); + String etToText = etTo.getText().toString(); + if (etToText != null && etToText.length() > 0) { + etBody.requestFocus(); + } else { + etTo.requestFocus(); + } } }); } diff --git a/app/src/main/res/layout/fragment_compose.xml b/app/src/main/res/layout/fragment_compose.xml index 507cdea3..9678638f 100644 --- a/app/src/main/res/layout/fragment_compose.xml +++ b/app/src/main/res/layout/fragment_compose.xml @@ -7,6 +7,7 @@ @@ -19,7 +20,9 @@ android:id="@+id/spFrom" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="6dp" + android:layout_marginTop="@dimen/content_margin" + android:layout_marginHorizontal="@dimen/content_margin" + android:minHeight="@dimen/input_height" app:layout_constraintEnd_toStartOf="@+id/ivIdentityAdd" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -137,9 +140,9 @@ android:id="@+id/rvAttachment" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="6dp" - android:layout_marginTop="3dp" - android:layout_marginEnd="6dp" + android:layout_marginHorizontal="@dimen/content_margin" + android:layout_marginTop="@dimen/content_margin" + android:padding="@dimen/compose_padding" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/vSeparatorAttachments" /> @@ -148,7 +151,7 @@ android:id="@+id/vSeparator" android:layout_width="match_parent" android:layout_height="1dp" - android:layout_marginTop="6dp" + android:layout_marginTop="@dimen/content_margin" android:background="?attr/colorSeparator" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/rvAttachment" /> @@ -157,8 +160,9 @@ android:id="@+id/etBody" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="6dp" - android:layout_marginEnd="6dp" + android:layout_marginHorizontal="@dimen/content_margin" + android:layout_marginVertical="@dimen/content_margin" + android:padding="@dimen/compose_padding" android:background="@null" android:fontFamily="monospace" android:gravity="top" diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 2f24fc12..750027d0 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -2,4 +2,7 @@ 12dp 6dp + 6dp + 6dp + 40dp From 4595289c7db00f897e60cab86a8b657b0048d99c Mon Sep 17 00:00:00 2001 From: Distopico Vegan Date: Tue, 20 Nov 2018 00:45:01 -0500 Subject: [PATCH 2/2] fix: message when no have identities --- .../org/dystopia/email/FragmentIdentities.java | 15 +++++++++++---- app/src/main/res/layout/fragment_identities.xml | 17 +++++++++++++++++ app/src/main/res/values-af/strings.xml | 1 + app/src/main/res/values-ar-rBH/strings.xml | 1 + app/src/main/res/values-ar-rEG/strings.xml | 1 + app/src/main/res/values-ar-rSA/strings.xml | 1 + app/src/main/res/values-ar-rYE/strings.xml | 1 + app/src/main/res/values-ar/strings.xml | 1 + app/src/main/res/values-az/strings.xml | 1 + app/src/main/res/values-ca/strings.xml | 1 + app/src/main/res/values-cs/strings.xml | 1 + app/src/main/res/values-da/strings.xml | 1 + app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values-el/strings.xml | 1 + app/src/main/res/values-en/strings.xml | 1 + app/src/main/res/values-es-rES/strings.xml | 1 + app/src/main/res/values-fa/strings.xml | 1 + app/src/main/res/values-fi/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 1 + app/src/main/res/values-he/strings.xml | 1 + app/src/main/res/values-hu/strings.xml | 1 + app/src/main/res/values-it/strings.xml | 1 + app/src/main/res/values-iw/strings.xml | 1 + app/src/main/res/values-ja/strings.xml | 1 + app/src/main/res/values-ko/strings.xml | 1 + app/src/main/res/values-nb/strings.xml | 1 + app/src/main/res/values-nl/strings.xml | 1 + app/src/main/res/values-no/strings.xml | 1 + app/src/main/res/values-pl/strings.xml | 1 + app/src/main/res/values-pt-rBR/strings.xml | 1 + app/src/main/res/values-pt-rPT/strings.xml | 1 + app/src/main/res/values-ro/strings.xml | 1 + app/src/main/res/values-ru/strings.xml | 1 + app/src/main/res/values-sr/strings.xml | 1 + app/src/main/res/values-sv-rSE/strings.xml | 1 + app/src/main/res/values-tr/strings.xml | 1 + app/src/main/res/values-uk/strings.xml | 1 + app/src/main/res/values-vi/strings.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 41 files changed, 67 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/dystopia/email/FragmentIdentities.java b/app/src/main/java/org/dystopia/email/FragmentIdentities.java index 1e773bd0..8bc0d5b5 100644 --- a/app/src/main/java/org/dystopia/email/FragmentIdentities.java +++ b/app/src/main/java/org/dystopia/email/FragmentIdentities.java @@ -34,8 +34,10 @@ import androidx.recyclerview.widget.RecyclerView; import com.google.android.material.floatingactionbutton.FloatingActionButton; import java.util.ArrayList; import java.util.List; +import android.widget.TextView; public class FragmentIdentities extends FragmentEx { + private TextView tvNoIdentities; private RecyclerView rvIdentity; private ProgressBar pbWait; private Group grpReady; @@ -55,6 +57,7 @@ public class FragmentIdentities extends FragmentEx { // Get controls rvIdentity = view.findViewById(R.id.rvIdentity); + tvNoIdentities = view.findViewById(R.id.tvNoIdentities); pbWait = view.findViewById(R.id.pbWait); grpReady = view.findViewById(R.id.grpReady); fab = view.findViewById(R.id.fab); @@ -85,6 +88,7 @@ public class FragmentIdentities extends FragmentEx { // Initialize grpReady.setVisibility(View.GONE); + tvNoIdentities.setVisibility(View.GONE); pbWait.setVisibility(View.VISIBLE); return view; @@ -103,10 +107,13 @@ public class FragmentIdentities extends FragmentEx { new Observer>() { @Override public void onChanged(@Nullable List identities) { - adapter.set( - identities == null - ? new ArrayList() - : identities); + if (identities == null) { + identities = new ArrayList(); + } else if (identities.size() == 0) { + tvNoIdentities.setVisibility(View.VISIBLE); + } + + adapter.set(identities); pbWait.setVisibility(View.GONE); grpReady.setVisibility(View.VISIBLE); diff --git a/app/src/main/res/layout/fragment_identities.xml b/app/src/main/res/layout/fragment_identities.xml index 656b1491..fd4b4ba7 100644 --- a/app/src/main/res/layout/fragment_identities.xml +++ b/app/src/main/res/layout/fragment_identities.xml @@ -34,6 +34,23 @@ android:layout_height="0dp" app:constraint_referenced_ids="rvIdentity" /> + + Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-ar-rBH/strings.xml b/app/src/main/res/values-ar-rBH/strings.xml index 9dee770c..b82f44c4 100644 --- a/app/src/main/res/values-ar-rBH/strings.xml +++ b/app/src/main/res/values-ar-rBH/strings.xml @@ -273,4 +273,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-ar-rEG/strings.xml b/app/src/main/res/values-ar-rEG/strings.xml index 9dee770c..b82f44c4 100644 --- a/app/src/main/res/values-ar-rEG/strings.xml +++ b/app/src/main/res/values-ar-rEG/strings.xml @@ -273,4 +273,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-ar-rSA/strings.xml b/app/src/main/res/values-ar-rSA/strings.xml index 9dee770c..b82f44c4 100644 --- a/app/src/main/res/values-ar-rSA/strings.xml +++ b/app/src/main/res/values-ar-rSA/strings.xml @@ -273,4 +273,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-ar-rYE/strings.xml b/app/src/main/res/values-ar-rYE/strings.xml index 9dee770c..b82f44c4 100644 --- a/app/src/main/res/values-ar-rYE/strings.xml +++ b/app/src/main/res/values-ar-rYE/strings.xml @@ -273,4 +273,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 9dee770c..b82f44c4 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -273,4 +273,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 5a5afaa1..499fbb45 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 0fbd2f18..3ba16693 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 9d4b0f82..f09c0e4f 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -265,4 +265,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 887ef913..99ac93f6 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index ebebeaf8..4836baa9 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 8f6ce8bd..110d1ffa 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml index 2bb162b1..24534d76 100644 --- a/app/src/main/res/values-en/strings.xml +++ b/app/src/main/res/values-en/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index fe3d3cdf..f0826036 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -257,4 +257,5 @@ Framework de almacenamiento no disponible Ver detalles Aún no tienes cuentas configuradas + Aún no tienes identidades configuradas diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index 1b2290ca..f8fe639b 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 8f6ce8bd..110d1ffa 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 14356943..eb55e263 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index da3da1e0..9287d3b6 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -265,4 +265,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 529cdacd..cb48725f 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 3f96f38d..dbd31a80 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index da3da1e0..9287d3b6 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -265,4 +265,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index c71bd098..00b94536 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -253,4 +253,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index c71bd098..00b94536 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -253,4 +253,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 8f6ce8bd..110d1ffa 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 53792b2a..56a1e75f 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-no/strings.xml b/app/src/main/res/values-no/strings.xml index 8f6ce8bd..110d1ffa 100644 --- a/app/src/main/res/values-no/strings.xml +++ b/app/src/main/res/values-no/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index d0d6a08b..814923e2 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -265,4 +265,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 8abe480b..16f32df5 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 8f6ce8bd..110d1ffa 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index c04a66d8..cc8bf601 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -261,4 +261,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 9d4b0f82..f09c0e4f 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -265,4 +265,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index ce1f0c8e..35f2ee18 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -261,4 +261,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-sv-rSE/strings.xml b/app/src/main/res/values-sv-rSE/strings.xml index b4c01c39..e076941d 100644 --- a/app/src/main/res/values-sv-rSE/strings.xml +++ b/app/src/main/res/values-sv-rSE/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 58ff85f9..3e188260 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -257,4 +257,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 9d4b0f82..f09c0e4f 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -265,4 +265,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index c71bd098..00b94536 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -253,4 +253,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 4ea3baf2..cc1b562b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -253,4 +253,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index c71bd098..00b94536 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -253,4 +253,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 42857ded..9667d0fa 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -323,4 +323,5 @@ Storage framework not available See details You don\'t have accounts configured yet + You don\'t have identities configured yet