Skip to content

Commit

Permalink
🐛 Fix: 친구가 아예 없을 경우 emptyView만 표시
Browse files Browse the repository at this point in the history
Related to: #347
  • Loading branch information
nahy-512 committed Feb 16, 2025
1 parent 5eed8c6 commit f8a8d79
Showing 1 changed file with 130 additions and 129 deletions.
259 changes: 130 additions & 129 deletions app/src/main/res/layout/activity_friend_invite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
app:layout_constraintTop_toBottomOf="@id/friend_invite_search_btn"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintVertical_bias="0.4">

<ImageView
android:layout_width="300dp"
Expand All @@ -104,149 +105,149 @@

</LinearLayout>

<!-- 초대할 친구 -->
<!-- 친구가 있을 때 -->
<LinearLayout
android:id="@+id/friend_invite_preparatory_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:visibility="@{viewModel.friendToInviteList.empty ? View.GONE : View.VISIBLE}"
android:layout_marginHorizontal="25dp"
android:orientation="vertical"
android:paddingHorizontal="25dp"
android:visibility="@{viewModel.allFriendList.empty ? View.GONE : View.VISIBLE}"
app:layout_constraintTop_toBottomOf="@id/friend_invite_search_btn">

<androidx.appcompat.widget.AppCompatTextView
<!-- 초대할 친구 -->
<LinearLayout
android:id="@+id/friend_invite_preparatory_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/moim_schedule_invite_friend"
style="@style/content_bold"/>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/friend_invite_preparatory_rv"
android:layout_marginTop="20dp"
android:visibility="@{viewModel.friendToInviteList.empty ? View.GONE : View.VISIBLE}"
android:orientation="vertical">

<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/moim_schedule_invite_friend"
style="@style/content_bold"/>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/friend_invite_preparatory_rv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:orientation="horizontal"
tools:listitem="@layout/item_friend_to_invite"/>

</LinearLayout>

<!-- 초대 정보 -->
<LinearLayout
android:id="@+id/friend_invite_reset_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:layout_marginTop="16dp"
android:orientation="horizontal"
tools:listitem="@layout/item_friend_to_invite"/>

</LinearLayout>

<!-- 초대 -->
<LinearLayout
android:id="@+id/friend_invite_reset_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="25dp"
android:orientation="horizontal"
android:visibility="@{viewModel.friendToInviteList.empty ? View.GONE : View.VISIBLE}"
app:layout_constraintTop_toBottomOf="@id/friend_invite_preparatory_ll">

<TextView
android:id="@+id/friend_invite_reset_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:text="@string/moim_schedule_invite_friend_reset"
android:textColor="@color/main_text"
style="@style/subtext_14"/>

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>

<TextView
android:id="@+id/friend_invite_selected_num_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_placeholder"
tools:text="3 / 7"
style="@style/button_label"/>

<TextView
android:id="@+id/friend_invite_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:paddingHorizontal="12dp"
android:paddingVertical="4dp"
android:background="@drawable/bg_basic_btn"
android:textColor="@color/white"
android:text="@string/moim_schedule_do_invite"
style="@style/button_label"/>

</LinearLayout>

<!-- 초대된 친구 -->
<LinearLayout
android:id="@+id/friend_invite_invited_friend_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginHorizontal="25dp"
android:orientation="vertical"
android:visibility="visible"
app:layout_constraintTop_toBottomOf="@id/friend_invite_reset_ll">

<androidx.appcompat.widget.AppCompatTextView
android:visibility="@{viewModel.friendToInviteList.empty ? View.GONE : View.VISIBLE}">

<TextView
android:id="@+id/friend_invite_reset_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:text="@string/moim_schedule_invite_friend_reset"
android:textColor="@color/main_text"
style="@style/subtext_14"/>

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>

<TextView
android:id="@+id/friend_invite_selected_num_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_placeholder"
tools:text="3 / 7"
style="@style/button_label"/>

<TextView
android:id="@+id/friend_invite_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:paddingHorizontal="12dp"
android:paddingVertical="4dp"
android:background="@drawable/bg_basic_btn"
android:textColor="@color/white"
android:text="@string/moim_schedule_do_invite"
style="@style/button_label"/>

</LinearLayout>

<!-- 초대된 친구 -->
<LinearLayout
android:id="@+id/friend_invite_invited_friend_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/moim_schedule_invited_friend"
style="@style/content_bold"/>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/friend_invite_invited_list_rv"
android:layout_marginTop="20dp"
android:orientation="vertical"
android:visibility="visible">

<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/moim_schedule_invited_friend"
style="@style/content_bold"/>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/friend_invite_invited_list_rv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:visibility="@{isInvitedFriendExist ? View.VISIBLE : View.GONE}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_friend_invite"
tools:itemCount="2"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:visibility="@{isInvitedFriendExist ? View.GONE : View.VISIBLE}"
android:text="@string/moim_schedule_invited_friend_not_yet"
android:layout_gravity="center"
style="@style/content_regular"/>

</LinearLayout>

<!-- 모든 친구 -->
<LinearLayout
android:id="@+id/friend_invite_all_friend_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:visibility="@{isInvitedFriendExist ? View.VISIBLE : View.GONE}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_friend_invite"
tools:itemCount="2"
app:layout_constraintTop_toBottomOf="@id/friend_search_et"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:visibility="@{isInvitedFriendExist ? View.GONE : View.VISIBLE}"
android:text="@string/moim_schedule_invited_friend_not_yet"
android:layout_gravity="center"
style="@style/content_regular"/>

</LinearLayout>

<!-- 모든 친구 -->
<LinearLayout
android:id="@+id/friend_invite_all_friend_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginHorizontal="25dp"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@id/friend_invite_invited_friend_ll">

<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/moim_schedule_all_friend"
style="@style/content_bold"/>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/friend_invite_list_rv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:visibility="@{viewModel.allFriendList.empty ? View.GONE : View.VISIBLE}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_friend_invite"
app:layout_constraintTop_toBottomOf="@id/friend_search_et"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
android:layout_marginTop="20dp"
android:orientation="vertical">

<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/moim_schedule_all_friend"
style="@style/content_bold"/>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/friend_invite_list_rv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:visibility="@{viewModel.allFriendList.empty ? View.GONE : View.VISIBLE}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_friend_invite"
app:layout_constraintTop_toBottomOf="@id/friend_search_et"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"/>

</LinearLayout>

</LinearLayout>

Expand Down

0 comments on commit f8a8d79

Please sign in to comment.