Merge pull request #1941 from Hafizzle/Fiz/no-party-design-changes

Updated No Party Design layout
This commit is contained in:
Phillip Thelen 2023-03-27 16:21:22 +02:00 committed by GitHub
commit d72db86370
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 109 additions and 79 deletions

View file

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/refreshLayout">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
@ -64,6 +65,7 @@
android:textColor="@color/text_ternary"
android:text="@string/no_party_title"
android:gravity="center"
android:fontFamily="sans-serif-medium"
android:layout_marginBottom="@dimen/spacing_medium"/>
<TextView
android:layout_width="match_parent"
@ -82,78 +84,96 @@
android:text="@string/create_party"
android:layout_marginTop="@dimen/spacing_large"/>
</LinearLayout>
<LinearLayout
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:paddingHorizontal="@dimen/spacing_sides"
android:paddingTop="@dimen/spacing_sides"
android:paddingBottom="60dp"
android:background="@color/window_background">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/party_seeking"
android:layout_marginBottom="@dimen/spacing_large"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Headline"
android:textSize="16sp"
android:text="@string/seeking_party_title"
android:gravity="center"
android:layout_marginBottom="@dimen/spacing_medium"/>
<TextView
android:id="@+id/join_party_description_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Body2"
android:text="@string/seeking_party_description"
android:textColor="@color/text_quad"
android:textColorLink="@color/text_brand_neon"
android:gravity="center"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_large"
android:layout_marginBottom="@dimen/spacing_large"/>
app:cardBackgroundColor="@color/window_background"
app:cardCornerRadius="16dp"
app:strokeWidth="0dp">
<Button
android:id="@+id/seek_party_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/HabiticaButton.Primary"
android:text="@string/look_for_party"/>
<LinearLayout
android:id="@+id/seeking_party_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:text="@string/you_re_looking_for_party"
android:textColor="@color/text_green"
style="@style/Body1_Button"
android:background="@drawable/success_border"/>
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingHorizontal="@dimen/spacing_sides"
android:paddingTop="@dimen/spacing_sides"
android:paddingBottom="60dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/party_seeking"
android:layout_marginBottom="@dimen/spacing_large"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/seeking_hint"
android:textColor="@color/text_green"
style="@style/Body1"
style="@style/Headline"
android:fontFamily="sans-serif-medium"
android:textSize="16sp"
android:text="@string/seeking_party_title"
android:gravity="center"
android:layout_marginTop="6dp"/>
<Button
android:id="@+id/leave_seeking_button"
android:layout_marginBottom="@dimen/spacing_medium"/>
<TextView
android:id="@+id/join_party_description_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/HabiticaButton.Borderless"
android:textColor="@color/text_maroon"
android:text="@string/leave_party_finder"/>
style="@style/Body2"
android:text="@string/seeking_party_description"
android:textColor="@color/text_quad"
android:textColorLink="@color/text_brand_neon"
android:gravity="center"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_large"
android:layout_marginBottom="@dimen/spacing_large"/>
<Button
android:id="@+id/seek_party_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/HabiticaButton.Primary"
android:text="@string/look_for_party"/>
<LinearLayout
android:id="@+id/seeking_party_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:text="@string/you_re_looking_for_party"
android:textColor="@color/text_green10_green500"
style="@style/Body1_Button"
android:textAllCaps="false"
android:background="@drawable/success_border"/>
<TextView
style="@style/Body1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="@string/seeking_hint"
android:textColor="@color/text_green10_green500" />
<Button
android:id="@+id/leave_seeking_button"
style="@style/HabiticaButton.Borderless"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/leave_party_finder"
android:textColor="@color/text_red_maroon"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View file

@ -780,7 +780,7 @@
<string name="defeat">Derrotado</string>
<string name="create">Crear</string>
<string name="only_leader_create_challenge">Solo el líder puede crear desafíos</string>
<string name="create_party">Crear un grupo</string>
<string name="create_party">Crear una nueva fiesta</string>
<string name="add_local_authentication">Agregar autentificación local</string>
<string name="task_title">Título de la misión</string>
<string name="new_password_repeat">Repite la nueva contraseña</string>

View file

@ -615,7 +615,7 @@ Die Quest-Schriftrolle wird an den Quest-Besitzer zurückgegeben.</string>
<string name="two_handed">Zweihändig</string>
<string name="verification_pet">Eines dieser Veteranen-Haustiere wartet auf Dich wenn Du die Bestätigung abgeschlossen hast!</string>
<string name="gift_subscription">Abonnement verschenken</string>
<string name="create_party">Party erstellen</string>
<string name="create_party">Eine neue Party erstellen</string>
<string name="subscribe_gift_description">Möchtest Du jemandem die Vorteile eines Abos schenken\?</string>
<string name="gift_one_get_one_description">Jetzt aktuell: \"Verschenke ein Abo und erhalte eins gratis\"-Aktion!</string>
<string name="gift_one_get_one">Verschenke eins, erhalte eins!</string>

View file

@ -643,7 +643,7 @@
<string name="preference_push_important_announcements">Important Announcements</string>
<string name="create">Create</string>
<string name="only_leader_create_challenge">Only leader can create Challenges</string>
<string name="create_party">Create Party</string>
<string name="create_party">Create a new Party</string>
<string name="notifications">Notifications</string>
<string name="no_notifications_title">Youre all caught up!</string>
<string name="no_notifications_text">The notification fairies give you a raucous round of applause! Well done!</string>

View file

@ -642,7 +642,7 @@
<string name="preference_push_important_announcements">Annonces importantes</string>
<string name="create">Créer</string>
<string name="only_leader_create_challenge">Seul le responsable peut créer un défi</string>
<string name="create_party">Créer une équipe</string>
<string name="create_party">Créer une nouvelle soirée</string>
<string name="notifications">Notifications</string>
<string name="no_notifications_title">Vous êtes à jour !</string>
<string name="no_notifications_text">Les fées de la notification vous font un tonnerre d\'applaudissements ! Bien joué !</string>

View file

@ -673,7 +673,7 @@
<string name="subscribe_listitem5">Udvostruči nagrade</string>
<string name="cancel_subscription_notgoogle_description">Više ne želiš biti pretplaćen/a\? Zbog ograničenja mobilnog plaćanja, morati ćeš odustati preko naše web stranice. Da to učiniš, dotakni gumb ispod, prijavi se na svoj račun, pritisni ikonu Korisnik gore desno, te odi na Pretplata. Bilo koji mjesečni krediti tvoje pretplate će biti apliciran nakon što je tvoja pretplata zaustavljena. Nedostajat ćeš nam!</string>
<string name="create">Stvori</string>
<string name="create_party">Stvori Družinu</string>
<string name="create_party">Stvoriti novu zabavu</string>
<string name="years">Godina</string>
<string name="x_class">%s Klasa</string>
<string name="discard_changes_to_task_message">Jesi li siguran/la da želiš odbaciti promjene ovom zadatku\?</string>

View file

@ -727,7 +727,7 @@
<string name="old_password">Kata Sandi Lama</string>
<string name="task_title">Judul Tugas</string>
<string name="add_local_authentication">Menambahkan Otentikasi Lokal</string>
<string name="create_party">Membuat Party</string>
<string name="create_party">Membuat pesta baru</string>
<string name="only_leader_create_challenge">Hanya ketua yang dapat membuat Tantangan</string>
<string name="defeat">Kalah</string>
<string name="invited_to_quest">Kamu telah diundang untuk melaksanakan Misi <b>%1$s</b></string>

View file

@ -704,7 +704,7 @@
<string name="old_password">Vecchia Password</string>
<string name="task_title">Titolo dell\'attività</string>
<string name="add_local_authentication">Aggiungi l\'Autenticazione Locale</string>
<string name="create_party">Crea una Squadra</string>
<string name="create_party">Creare una nuova squadra</string>
<string name="only_leader_create_challenge">Solo il leader può creare delle Sfide</string>
<string name="create">Crea</string>
<string name="defeat">Sconfiggi</string>

View file

@ -642,7 +642,7 @@
<string name="preference_push_important_announcements">大切なお知らせ</string>
<string name="create">作成する</string>
<string name="only_leader_create_challenge">リーダーだけが、チャレンジを作成できます</string>
<string name="create_party">パーティーを作成する</string>
<string name="create_party">新しいパーティーを作成する</string>
<string name="notifications">通知</string>
<string name="no_notifications_title">全ての通知をチェックしました!</string>
<string name="no_notifications_text">通知の妖精はパチパチとあなたに拍手を送っています!えらい!</string>

View file

@ -592,7 +592,7 @@
<string name="setup_task_reward">스스로에게 보상을 주세요</string>
<string name="setup_task_reward_notes">TV 보기, 게임하기, 군것질 하기, 당신에게 달려있어요!</string>
<string name="visit_website">웹사이트로 가기</string>
<string name="create_party">파티 만들기</string>
<string name="create_party">새로운 파티 만들기</string>
<string name="no_party_description">친구들과 함께 혹은 혼자 퀘스트 수행을 해봐요. 파티를 통해 몬스터와 싸우고, 도전을 시작하고, 책임감을 유지할 수 있게 스스로를 도와주세요.</string>
<string name="insufficientSubscriberGems">이번 달에 살 수 있는 보석을 모두 구입했습니다. 매달 첫 3일 안에 더 구입할 수 있도록 재충전이 됩니다. 후원해주셔서 감사해요!</string>
<string name="world_boss_description_3">평소의 퀘스트 보스도 함께 피해를 입기 때문에 동시에 진행할 수 있습니다</string>

View file

@ -49,7 +49,9 @@
<color name="text_teal_white">@color/white</color>
<color name="text_brown_white">@color/white</color>
<color name="text_brand_white">@color/white</color>
<color name="text_red_maroon">@color/red_100</color>
<color name="lightly_tinted_background">@color/brand_50</color>
<color name="text_green10_green500">@color/green_500</color>
<color name="dialog_background">@color/gray_10</color>
<color name="armoire_text">@color/gray_400</color>

View file

@ -828,7 +828,7 @@
<string name="discover">Ontdekken</string>
<string name="gift_confirmation_text_sub">Je hebt %s een %s-maand Habitica abonnement gestuurd.</string>
<string name="task_title">Taaktitel</string>
<string name="create_party">Gezelschap aanmaken</string>
<string name="create_party">Een nieuwe groep aanmaken</string>
<string name="only_leader_create_challenge">Alleen de leider kan uitdagingen creëren</string>
<string name="create">Creëren</string>
<string name="defeat">Vernietiging</string>

View file

@ -738,7 +738,7 @@
<string name="x_class">Klasa %s</string>
<string name="become_x">Zostań %s</string>
<string name="need_more_help">Potrzebujesz więcej wsparcia\?</string>
<string name="create_party">Stwórz drużynę</string>
<string name="create_party">Stwórz nowy zespół</string>
<string name="create">Stwórz</string>
<string name="gift_confirmation_text_sub">Wysłałeś %s %s-miesięczną subskrypcję Habitica.</string>
<string name="gift_confirmation_text_sub_g1g1">Wysłałeś %s %s-miesięczną subskrypcję Habitica i taka sama subskrypcja zasiliła Twoje konto w ramach promocji Dajesz - Dostajesz!</string>

View file

@ -641,7 +641,7 @@
<string name="preference_push_important_announcements">Anúncios importantes</string>
<string name="create">Criar</string>
<string name="only_leader_create_challenge">Somente líderes podem criar Desafios</string>
<string name="create_party">Criar Grupo</string>
<string name="create_party">Criar um novo grupo</string>
<string name="notifications">Notificações</string>
<string name="no_notifications_title">Você está com tudo em dia!</string>
<string name="no_notifications_text">As fadas da notificação lhe deram uma rodada de aplausos barulhentos! Muito bem!</string>

View file

@ -641,7 +641,7 @@
<string name="preference_push_important_announcements">Важные объявления</string>
<string name="create">Создать</string>
<string name="only_leader_create_challenge">Только лидер может создавать испытания</string>
<string name="create_party">Создать команду</string>
<string name="create_party">Создать новую команду</string>
<string name="notifications">Уведомления</string>
<string name="no_notifications_title">Вы все вспомнили!</string>
<string name="no_notifications_text">Феи уведомлений вам тихо рукоплещут! Отлично сработано!</string>

View file

@ -642,7 +642,7 @@
<string name="preference_push_important_announcements">Önemli Duyurular</string>
<string name="create">Oluştur</string>
<string name="only_leader_create_challenge">Sadece lider Mücadele oluşturabilir</string>
<string name="create_party">Takım Oluştur</string>
<string name="create_party">Yeni bir takım oluştur</string>
<string name="notifications">Bildirimler</string>
<string name="no_notifications_title">Bildirimleri temizledin!</string>
<string name="no_notifications_text">Bildirim perileri seni şevkle alkışlıyor! Bravo!</string>

View file

@ -1003,7 +1003,7 @@
<string name="old_password">Старий пароль</string>
<string name="task_title">Назва задачі</string>
<string name="add_local_authentication">Додати локальну аутентифікацію</string>
<string name="create_party">Створити команду</string>
<string name="create_party">Створити нову команду</string>
<string name="invited_to_public_guild">Вас запросили в гільдію <b>%1$s</b></string>
<string name="invited_to_quest">Вас запросили на квест <b>%1$s</b></string>
<string name="invited_to_private_guild">Вас запросили приєднатися до приватної гільдії <b>%1$s</b></string>

View file

@ -675,7 +675,7 @@
<string name="old_password">Mật khẩu cũ</string>
<string name="task_title">Tiêu đề Công việc</string>
<string name="add_local_authentication">Thêm Xác thực Cục bộ</string>
<string name="create_party">Tạo Tổ đội</string>
<string name="create_party">Tạo một đội mới</string>
<string name="only_leader_create_challenge">Chỉ có Lãnh đạo có thể tạo Thử thách</string>
<string name="create">Tạo</string>
<string name="defeat">Đánh bại</string>

View file

@ -119,8 +119,10 @@
<color name="text_teal_white">@color/teal_10</color>
<color name="text_brown_white">#7f3300</color>
<color name="text_brand_white">@color/brand_300</color>
<color name="text_red_maroon">@color/maroon_100</color>
<color name="lightly_tinted_background">@color/brand_700</color>
<color name="dialog_background">@color/white</color>
<color name="error_banner_background">@color/maroon_5</color>
<color name="text_green10_green500">@color/green_10</color>
<color name="text_gold">@color/yellow_1</color>
</resources>

View file

@ -771,7 +771,7 @@
<string name="defeat">Defeat</string>
<string name="create">Create</string>
<string name="only_leader_create_challenge">Only leader can create Challenges</string>
<string name="create_party">Create Party</string>
<string name="create_party">Create a new Party</string>
<string name="add_local_authentication">Add Local Authentication</string>
<string name="task_title">Task Title</string>
@ -1365,7 +1365,7 @@
<string name="pause_damage_3_description">Damage to a boss or found collection items will be stored until you resume damage</string>
<string name="list">List</string>
<string name="by_invite">By Invite</string>
<string name="habiticans_looking_party">Heres a list of Habiticans looking to join a Party</string>
<string name="habiticans_looking_party_empty">There\'s no one looking for a Party right now. You can check back later!</string>
<string name="invited">Invited</string>
<string name="invite_with_username_email">Invite with @username or email</string>
<string name="habiticans_send_invite">Send an invite directly to Habiticans you know</string>

View file

@ -9,11 +9,13 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.IntrinsicSize
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.Divider
@ -31,6 +33,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.fragment.app.viewModels
@ -237,8 +240,11 @@ fun PartySeekingView(
fontWeight = FontWeight.Medium
)
Text(
stringResource(R.string.habiticans_looking_party),
color = HabiticaTheme.colors.textSecondary
stringResource(R.string.habiticans_looking_party_empty),
textAlign = TextAlign.Center,
color = HabiticaTheme.colors.textSecondary, modifier = Modifier
.width(250.dp)
.align(alignment = Alignment.CenterHorizontally)
)
}
}