Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 다른유저 비공개 화면 구현 #416

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ class OtherUserPageActivity :
otherUserPageViewModel.otherUserProfile.observe(this) { otherUserProfile ->
setUpMyProfileImage(otherUserProfile.avatarImage.orEmpty())
}

otherUserPageViewModel.otherUserProfile.observe(this) { profile ->
val isPublic = profile.isProfilePublic
yeonjeen marked this conversation as resolved.
Show resolved Hide resolved
if (isPublic) {
binding.vpOtherUserPage.visibility = View.VISIBLE
binding.clOtherUserPageNoPublic.visibility = View.GONE
} else {
binding.vpOtherUserPage.visibility = View.GONE
binding.clOtherUserPageNoPublic.visibility = View.VISIBLE
}
}
}

private fun setUpMyProfileImage(otherUserProfileUrl: String) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions app/src/main/res/layout/activity_other_user_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,40 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_other_user_page_no_public"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent">

<ImageView
android:id="@+id/iv_other_user_page_no_public"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/img_other_user_page_no_public"
android:layout_marginTop="100dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>

<TextView
android:id="@+id/tv_other_user_page_no_public_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:text='@{String.format(@string/other_user_page_no_public, otherUserPageViewModel.otherUserProfile.nickname)}'
android:textAppearance="@style/body2"
android:textColor="@color/gray_200_AEADB3"
app:layout_constraintTop_toBottomOf="@id/iv_other_user_page_no_public"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.core.widget.NestedScrollView>
Expand Down
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 @@ -341,6 +341,7 @@
<string name="other_user_page_library">서재</string>
<string name="other_user_page_activity">활동</string>
<string name="other_user_page_popup_blocked_user_kebab_button">차단하기</string>
<string name="other_user_page_no_public">%1$s님의 프로필은\n비공개 상태에요</string>
<string name="block_user_title">해당 유저를 차단할까요?</string>
<string name="block_user_description">상대의 게시글, 댓글,\n프로필을 볼 수 없어요</string>
<string name="block_user_button">차단</string>
Expand Down