Skip to content

Commit

Permalink
better empty team view
Browse files Browse the repository at this point in the history
  • Loading branch information
strawberrybread committed Jul 1, 2024
1 parent 4688b7f commit 9000eac
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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?) {
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/layout/fragment_team.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@
android:layout_weight="1" />

</LinearLayout>

<TextView
android:visibility="gone"
android:id="@+id/tvMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/no_teams"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/add_team"
android:layout_width="wrap_content"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1045,5 +1045,6 @@
<string name="checking_server">جارٍ فحص الخادم</string>
<string name="below_min_apk">إصدار Apk أقل من المسموح. يرجى تحديث التطبيق إلى أحدث إصدار.</string>
<string name="add_note">إضافة ملاحظة (اختياري)</string>
<string name="no_teams">الفرق غير متوفرة</string>

</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1045,5 +1045,6 @@
<string name="checking_server">verificando el servidor</string>
<string name="below_min_apk">la versión de la aplicación está por debajo de la permitida. Actualice la aplicación a la última versión.</string>
<string name="add_note">Agregar una nota (opcional)</string>
<string name="no_teams">equipos no disponibles</string>

</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1045,5 +1045,6 @@
<string name="checking_server">vérification du serveur</string>
<string name="below_min_apk">la version de l\'app est inférieure à celle autorisée. veuillez mettre à jour l\'application vers la dernière version.</string>
<string name="add_note">Ajouter une note (optionnel)</string>
<string name="no_teams">équipes non disponibles</string>

</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-ne/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1045,5 +1045,6 @@
<string name="checking_server">सर्भर जाँच गर्दै</string>
<string name="below_min_apk">एप संस्करण अनुमत संस्करणभन्दा कम छ। कृपया अनुप्रयोगलाई नवीनतम संस्करणमा अद्यावधिक गर्नुहोस्।</string>
<string name="add_note">नोट थप्नुहोस् (वैकल्पिक)</string>
<string name="no_teams">टोलीहरू उपलब्ध छैनन्</string>

</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-so/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1045,5 +1045,6 @@
<string name="checking_server">hubinta server-ka</string>
<string name="below_min_apk">nooca app-ga waa ka hooseeyaa kan la oggol yahay. fadlan cusbooneysii app-ka nooca ugu dambeeya.</string>
<string name="add_note">Ku dar falanqeey (ixtiyaacsi ah)</string>
<string name="no_teams">kooxaha aan la heli karin</string>

</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,7 @@
<string name="no_join_request_available">no join request available</string>
<string name="no_news">news not available</string>
<string name="no_surveys">surveys not available</string>
<string name="no_teams">teams not available</string>
<string name="edit_image">edit profile image</string>
<string name="compulsory_first_name">first name required</string>
<string name="compulsory_last_name">last name is required</string>
Expand Down

0 comments on commit 9000eac

Please sign in to comment.