-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
조와쒀~!
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") |
There was a problem hiding this comment.
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")
}
아니면 이렇게도
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다른 곳에서 안쓰이는 새로운 변수를 굳이 따로 만들어서 보내는거를 피해야 하는거죠 ?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
살짝 예전 java식이라고 할 수 있죠~
private fun initReturnButton(activity: Activity) { | ||
binding.btnProfileQuitForSureBack.setOnSingleClickListener { | ||
activity.finish() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private fun initReturnButton(activity: Activity) { | |
binding.btnProfileQuitForSureBack.setOnSingleClickListener { | |
activity.finish() | |
} | |
} | |
private fun initReturnButton() { | |
binding.btnProfileQuitForSureBack.setOnSingleClickListener { | |
finish() | |
} | |
} |
이렇게 구현해도 되지 않나용
private lateinit var modelName: String | ||
private lateinit var modelId: String | ||
private lateinit var modelSchool: String | ||
private lateinit var modelThumbnail: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 값들을 뷰모델에 저장하고 fragment나 activity에서 뷰모델을 공유해서 사용할 수도 있지 않을까 생각이 듭니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
구현 완료 ~~
private fun initBackButton(activity: Activity) { | ||
binding.btnProfileQuitBack.setOnSingleClickListener { | ||
activity.finish() | ||
} | ||
} | ||
|
||
private fun initReturnButton(activity: Activity) { | ||
binding.btnProfileQuitReturn.setOnSingleClickListener { | ||
activity.finish() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 함수 매개변수로 Activity없이 그냥 finish() 호출해도 될듯합니다
if (item.thumbnail != null) { | ||
binding.ivProfileFriendItemThumbnail.load(item.thumbnail) { | ||
transformations(CircleCropTransformation()) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (item.thumbnail != null) { | |
binding.ivProfileFriendItemThumbnail.load(item.thumbnail) { | |
transformations(CircleCropTransformation()) | |
} | |
} | |
item.thumbnail?.let { thumbnail -> | |
binding.ivProfileFriendItemThumbnail.load(thumbnail) { | |
transformations(CircleCropTransformation()) | |
} | |
} |
이렇게 사용해도 되지 않을까용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let을 ?.랑 함께 사용하면 null 부분을 대체할 수 있는거로 이해하면 될까요 !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
맞습니다 좀 더 코틀린스러운 코딩으로~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셧슴당 최고다 최고!!!!
binding.btnProfileAddGroup.setOnSingleClickListener { | ||
// TODO: 그룹 추가 로직 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
얘도 함수화 따로 해주면 좋을 것 가타요
private fun setItemData() { | ||
binding.tvProfileFriendName.text = modelName | ||
binding.tvProfileFriendId.text = modelId | ||
binding.tvProfileFriendSchool.text = modelSchool | ||
if (modelThumbnail != "") { | ||
binding.ivProfileFriendThumbnail.load(modelThumbnail) { | ||
transformations(CircleCropTransformation()) | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SharedViewModel 사용하면 데이터바인딩으로 처리 가넝할 듯 합니다
ProflieFriendDeleteBottomSheet.newInstance( | ||
modelName, | ||
modelId, | ||
modelSchool, | ||
modelThumbnail | ||
).show(parentFragmentManager, "Dialog") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요부분 바텀시트 새로 띄우는 식으로 구현해도 되는지 한번 여쭤보는 거 어때요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
괜찮대요 ~~
@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 | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newInstance 활용 아주 굿굿티비!!! 깔끔하다!!!
There was a problem hiding this comment.
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이와 같은 데이터 및 엑세스 권한을 전부 잃게 됩니다." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나중에 텍스트 추출 안 한 부분 싹 합시다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅠㅠ
<ImageView | ||
android:layout_width="80dp" | ||
android:layout_height="4dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고정 dp는 최대한 지양하는 것이 기기 호환성에 좋을 것 같아요!
전 웬만하면 wrap_content
나 0dp
활용해서 구현합니당
다른 컴포넌트들도 한번씩 확인 부탁드립니다!!
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아주 체인 마스터를 하셧군요 최고다!!!!!!!!!!!!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
체인 최고
There was a problem hiding this 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) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
바텀시트 커스텀 굳 !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
크니까 왕 귀여워요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
왕
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굳굳 !!
⛳️ Work Description
TODO
📸 Screenshot
KakaoTalk_Video_2023-07-14-04-49-33.mp4
📢 To Reviewers