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

[UI/#28] Profile / UI 구현 #30

Merged
merged 30 commits into from
Jul 14, 2023
Merged

[UI/#28] Profile / UI 구현 #30

merged 30 commits into from
Jul 14, 2023

Conversation

Marchbreeze
Copy link
Member

@Marchbreeze Marchbreeze commented Jul 13, 2023

⛳️ Work Description

  • 스크롤바 설정
  • 프로필 UI 설정
  • 리사이클러뷰 구현
  • 플로팅 버튼 설정
  • 아이템 클릭 시 바텀시트 올라오기
  • 바텀시트 구현
  • 바텀시트 버튼 구현
  • 프로필 관리 액티비티 설정
  • 계정탈퇴 프래그먼트 설정
  • 로그아웃 기능 설정
  • 카카오 회원탈퇴 설정
  • 플로팅 버튼 기능 설정
  • 리사이클러뷰 아이템에 디바이더 따로 빼서 구현하기
  • 플로팅 버튼 동그랗게 설정하기
  • 앱 아이콘 설정하기

TODO

  • 친구 0명이면 친구 초대 화면 띄우기 -> 서버통신 이후
  • 바텀시트 테두리 조정하기 -> 민주가 !
  • 페이징 적용해서 무한 스크롤 만들기 -> 서버통신 이후
  • FAB 처음 눌렀을 때 리사이클러뷰까지만 가는 오류 -> 스택강민플로우 문의 예정

📸 Screenshot

KakaoTalk_Video_2023-07-14-04-49-33.mp4

📢 To Reviewers

  • 키 해시값 카카오 디벨로퍼에 해주셔야해요 !! 서버통신 들어가면 필요함 ㅜㅜ 로그값 받아서 그냥 저 주셔도 됨

@Marchbreeze Marchbreeze added UI 💐 UI 작업 상호 🍀 Sangho's Task labels Jul 13, 2023
@Marchbreeze Marchbreeze added this to the UI 구현 milestone Jul 13, 2023
@Marchbreeze Marchbreeze requested a review from a team as a code owner July 13, 2023 20:14
@Marchbreeze Marchbreeze self-assigned this Jul 13, 2023
@Marchbreeze Marchbreeze changed the title [UI/#28] profile / UI 구현 [UI/#28] Profile / UI 구현 Jul 13, 2023
Copy link
Contributor

@kkk5474096 kkk5474096 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

조와쒀~!

Comment on lines 64 to 69
val name = profileFriendModel.name
val yelloId = profileFriendModel.yelloId
val school = profileFriendModel.school
val thumbnail = profileFriendModel.thumbnail ?: ""
ProfileFriendItemBottomSheet.newInstance(name, yelloId, school, thumbnail)
.show(parentFragmentManager, "dialog")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProfileFriendItemBottomSheet.newInstance(profileFriendModel.name, profileFriendModel.yelloId, profileFriendModel.school, profileFriendModel.thumbnail ?: "")
.show(parentFragmentManager, "dialog")

이렇게 해도 되지 않을까용

profileFriendModel.apply {
ProfileFriendItemBottomSheet.newInstance(name, yelloId, school, thumbnail ?: "")
.show(parentFragmentManager, "dialog")
}

아니면 이렇게도

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

다른 곳에서 안쓰이는 새로운 변수를 굳이 따로 만들어서 보내는거를 피해야 하는거죠 ?!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

살짝 예전 java식이라고 할 수 있죠~

Comment on lines 22 to 26
private fun initReturnButton(activity: Activity) {
binding.btnProfileQuitForSureBack.setOnSingleClickListener {
activity.finish()
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private fun initReturnButton(activity: Activity) {
binding.btnProfileQuitForSureBack.setOnSingleClickListener {
activity.finish()
}
}
private fun initReturnButton() {
binding.btnProfileQuitForSureBack.setOnSingleClickListener {
finish()
}
}

이렇게 구현해도 되지 않나용

Comment on lines 15 to 18
private lateinit var modelName: String
private lateinit var modelId: String
private lateinit var modelSchool: String
private lateinit var modelThumbnail: String
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 값들을 뷰모델에 저장하고 fragment나 activity에서 뷰모델을 공유해서 사용할 수도 있지 않을까 생각이 듭니다.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

구현 완료 ~~

Comment on lines 22 to 32
private fun initBackButton(activity: Activity) {
binding.btnProfileQuitBack.setOnSingleClickListener {
activity.finish()
}
}

private fun initReturnButton(activity: Activity) {
binding.btnProfileQuitReturn.setOnSingleClickListener {
activity.finish()
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 함수 매개변수로 Activity없이 그냥 finish() 호출해도 될듯합니다

Comment on lines 16 to 20
if (item.thumbnail != null) {
binding.ivProfileFriendItemThumbnail.load(item.thumbnail) {
transformations(CircleCropTransformation())
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (item.thumbnail != null) {
binding.ivProfileFriendItemThumbnail.load(item.thumbnail) {
transformations(CircleCropTransformation())
}
}
item.thumbnail?.let { thumbnail ->
binding.ivProfileFriendItemThumbnail.load(thumbnail) {
transformations(CircleCropTransformation())
}
}

이렇게 사용해도 되지 않을까용

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let을 ?.랑 함께 사용하면 null 부분을 대체할 수 있는거로 이해하면 될까요 !

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맞습니다 좀 더 코틀린스러운 코딩으로~

Copy link
Member

@b1urrrr b1urrrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셧슴당 최고다 최고!!!!

Comment on lines 21 to 23
binding.btnProfileAddGroup.setOnSingleClickListener {
// TODO: 그룹 추가 로직
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얘도 함수화 따로 해주면 좋을 것 가타요

Comment on lines 41 to 50
private fun setItemData() {
binding.tvProfileFriendName.text = modelName
binding.tvProfileFriendId.text = modelId
binding.tvProfileFriendSchool.text = modelSchool
if (modelThumbnail != "") {
binding.ivProfileFriendThumbnail.load(modelThumbnail) {
transformations(CircleCropTransformation())
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SharedViewModel 사용하면 데이터바인딩으로 처리 가넝할 듯 합니다

Comment on lines 55 to 60
ProflieFriendDeleteBottomSheet.newInstance(
modelName,
modelId,
modelSchool,
modelThumbnail
).show(parentFragmentManager, "Dialog")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요부분 바텀시트 새로 띄우는 식으로 구현해도 되는지 한번 여쭤보는 거 어때요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

괜찮대요 ~~

Comment on lines 65 to 80
@JvmStatic
fun newInstance(
modelName: String,
modelId: String,
modelSchool: String,
modelThumbnail: String
) =
ProfileFriendItemBottomSheet().apply {
val args = Bundle()
args.putString("modelName", modelName)
args.putString("modelId", modelId)
args.putString("modelSchool", modelSchool)
args.putString("modelThumbnail", modelThumbnail)
arguments = args
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newInstance 활용 아주 굿굿티비!!! 깔끔하다!!!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

근데 뷰모델로 갈아엎었어요 ㅎㅎ

android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="지금 계정을 탈퇴하시면\n이와 같은 데이터 및 엑세스 권한을 전부 잃게 됩니다."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

나중에 텍스트 추출 안 한 부분 싹 합시다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅠㅠ

Comment on lines +16 to +18
<ImageView
android:layout_width="80dp"
android:layout_height="4dp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고정 dp는 최대한 지양하는 것이 기기 호환성에 좋을 것 같아요!
전 웬만하면 wrap_content0dp 활용해서 구현합니당
다른 컴포넌트들도 한번씩 확인 부탁드립니다!!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵!

android:textAppearance="?textAppearanceHeadline3"
android:textColor="@color/white"
app:layout_constraintEnd_toStartOf="@id/tv_profile_friend_id"
app:layout_constraintHorizontal_chainStyle="packed"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아주 체인 마스터를 하셧군요 최고다!!!!!!!!!!!!!!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

체인 최

Copy link
Contributor

@minju1459 minju1459 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

뷰도 많고 부가적인 것들이 많았을텐데 정말 수고하셨습니다 :)😊

}
dialog?.setCanceledOnTouchOutside(false)
dialog?.setCancelable(true)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

바텀시트 커스텀 굳 !!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

크니까 왕 귀여워요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굳굳 !!

@Marchbreeze Marchbreeze merged commit 73b2474 into develop Jul 14, 2023
@Marchbreeze Marchbreeze deleted the ui/#28-profile-view branch July 14, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI 💐 UI 작업 상호 🍀 Sangho's Task
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[UI] profile / 프로필 뷰 구현
4 participants