From 9000eac527f466ecd14b24036c1cba71ab8ea859 Mon Sep 17 00:00:00 2001 From: Vivian Li Date: Mon, 1 Jul 2024 09:52:28 -0400 Subject: [PATCH 1/4] better empty team view --- .../java/org/ole/planet/myplanet/ui/team/TeamFragment.kt | 9 +++++++++ app/src/main/res/layout/fragment_team.xml | 8 +++++++- app/src/main/res/values-ar/strings.xml | 1 + app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 1 + app/src/main/res/values-ne/strings.xml | 1 + app/src/main/res/values-so/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 8 files changed, 22 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt b/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt index e14ba5c943..a7ce487c88 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt @@ -242,6 +242,15 @@ class TeamFragment : Fragment(), AdapterTeamList.OnClickTeamItem { } fragmentTeamBinding.rvTeamList.adapter = adapterTeamList listContentDescription(conditionApplied) + if (list.isEmpty()) { + fragmentTeamBinding.etSearch.visibility = View.GONE + fragmentTeamBinding.tableTitle.visibility = View.GONE + fragmentTeamBinding.tvMessage.visibility = View.VISIBLE + } else { + fragmentTeamBinding.etSearch.visibility = View.VISIBLE + fragmentTeamBinding.tableTitle.visibility = View.VISIBLE + fragmentTeamBinding.tvMessage.visibility = View.GONE + } } override fun onEditTeam(team: RealmMyTeam?) { diff --git a/app/src/main/res/layout/fragment_team.xml b/app/src/main/res/layout/fragment_team.xml index d3a3a36750..02cf1e109b 100644 --- a/app/src/main/res/layout/fragment_team.xml +++ b/app/src/main/res/layout/fragment_team.xml @@ -97,7 +97,13 @@ android:layout_weight="1" /> - + جارٍ فحص الخادم إصدار Apk أقل من المسموح. يرجى تحديث التطبيق إلى أحدث إصدار. إضافة ملاحظة (اختياري) + الفرق غير متوفرة diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index cb2b404ed3..66f2ca605a 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -1045,5 +1045,6 @@ verificando el servidor la versión de la aplicación está por debajo de la permitida. Actualice la aplicación a la última versión. Agregar una nota (opcional) + equipos no disponibles diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index dcea61b2ce..906075dd4a 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -1045,5 +1045,6 @@ vérification du serveur la version de l\'app est inférieure à celle autorisée. veuillez mettre à jour l\'application vers la dernière version. Ajouter une note (optionnel) + équipes non disponibles diff --git a/app/src/main/res/values-ne/strings.xml b/app/src/main/res/values-ne/strings.xml index 6ddc1d7164..0d9aab821e 100644 --- a/app/src/main/res/values-ne/strings.xml +++ b/app/src/main/res/values-ne/strings.xml @@ -1045,5 +1045,6 @@ सर्भर जाँच गर्दै एप संस्करण अनुमत संस्करणभन्दा कम छ। कृपया अनुप्रयोगलाई नवीनतम संस्करणमा अद्यावधिक गर्नुहोस्। नोट थप्नुहोस् (वैकल्पिक) + टोलीहरू उपलब्ध छैनन् diff --git a/app/src/main/res/values-so/strings.xml b/app/src/main/res/values-so/strings.xml index 69f95a14e5..ed47d2e95b 100644 --- a/app/src/main/res/values-so/strings.xml +++ b/app/src/main/res/values-so/strings.xml @@ -1045,5 +1045,6 @@ hubinta server-ka nooca app-ga waa ka hooseeyaa kan la oggol yahay. fadlan cusbooneysii app-ka nooca ugu dambeeya. Ku dar falanqeey (ixtiyaacsi ah) + kooxaha aan la heli karin diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 28cf04b755..fbd612e19c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1019,6 +1019,7 @@ no join request available news not available surveys not available + teams not available edit profile image first name required last name is required From 6d80185a143015b1d9854518ec16d630f829ff2a Mon Sep 17 00:00:00 2001 From: Vivian Li Date: Tue, 2 Jul 2024 09:31:03 -0400 Subject: [PATCH 2/4] use showNoData --- .../ole/planet/myplanet/base/BaseRecyclerFragment.kt | 1 + .../org/ole/planet/myplanet/ui/team/TeamFragment.kt | 11 +++++------ app/src/main/res/layout/fragment_team.xml | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/ole/planet/myplanet/base/BaseRecyclerFragment.kt b/app/src/main/java/org/ole/planet/myplanet/base/BaseRecyclerFragment.kt index 9cda0ef557..1a4d902cac 100644 --- a/app/src/main/java/org/ole/planet/myplanet/base/BaseRecyclerFragment.kt +++ b/app/src/main/java/org/ole/planet/myplanet/base/BaseRecyclerFragment.kt @@ -296,6 +296,7 @@ abstract class BaseRecyclerFragment
  • : BaseRecyclerParentFragment(), On "discussions" -> (v as TextView).setText(R.string.no_news) "survey" -> (v as TextView).setText(R.string.no_surveys) "submission" -> (v as TextView).setText(R.string.no_submissions) + "teams" -> (v as TextView).setText(R.string.no_teams) else -> (v as TextView).setText(R.string.no_data_available_please_check_and_try_again) } } diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt b/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt index a7ce487c88..adfc1b1531 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt @@ -5,12 +5,14 @@ import android.os.Bundle import android.text.Editable import android.text.TextUtils import android.text.TextWatcher +import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.appcompat.app.AlertDialog import androidx.fragment.app.Fragment import androidx.recyclerview.widget.LinearLayoutManager +import org.ole.planet.myplanet.base.BaseRecyclerFragment.Companion.showNoData import io.realm.Case import io.realm.Realm import io.realm.RealmQuery @@ -242,14 +244,11 @@ class TeamFragment : Fragment(), AdapterTeamList.OnClickTeamItem { } fragmentTeamBinding.rvTeamList.adapter = adapterTeamList listContentDescription(conditionApplied) - if (list.isEmpty()) { + val itemCount = adapterTeamList?.itemCount + showNoData(fragmentTeamBinding.tvMessage, itemCount, "teams") + if (itemCount == 0) { fragmentTeamBinding.etSearch.visibility = View.GONE fragmentTeamBinding.tableTitle.visibility = View.GONE - fragmentTeamBinding.tvMessage.visibility = View.VISIBLE - } else { - fragmentTeamBinding.etSearch.visibility = View.VISIBLE - fragmentTeamBinding.tableTitle.visibility = View.VISIBLE - fragmentTeamBinding.tvMessage.visibility = View.GONE } } diff --git a/app/src/main/res/layout/fragment_team.xml b/app/src/main/res/layout/fragment_team.xml index 02cf1e109b..44913a6185 100644 --- a/app/src/main/res/layout/fragment_team.xml +++ b/app/src/main/res/layout/fragment_team.xml @@ -102,8 +102,7 @@ android:id="@+id/tvMessage" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center" - android:text="@string/no_teams"/> + android:layout_gravity="center" /> Date: Wed, 3 Jul 2024 13:40:54 +0300 Subject: [PATCH 3/4] cleanup --- .../main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt | 1 - app/src/main/res/values/strings.xml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt b/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt index adfc1b1531..4a4443ff8b 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt @@ -5,7 +5,6 @@ import android.os.Bundle import android.text.Editable import android.text.TextUtils import android.text.TextWatcher -import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6a836bf8fb..b7b0d00f43 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1019,7 +1019,6 @@ no join request available news not available surveys not available - teams not available edit profile image first name required last name is required @@ -1046,6 +1045,7 @@ checking server app is below allowed version. please update the app to the latest version. add a note (optional) + teams not available submissions not available no previous chats From f5486195d6bcf539932a997a84e44733e2ac8388 Mon Sep 17 00:00:00 2001 From: dogi Date: Wed, 3 Jul 2024 10:14:49 -0400 Subject: [PATCH 4/4] Update build.gradle --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index bf08b29d85..39c736ec40 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 21 targetSdkVersion 34 - versionCode 1646 - versionName "0.16.46" + versionCode 1647 + versionName "0.16.47" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true