-
Notifications
You must be signed in to change notification settings - Fork 0
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
#30 [feat] 설정 뷰 + 공통 바텀시트 #35
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.
밤새 넘 수고해따..!! 넘 머싯어 갓기야
import com.google.android.material.bottomsheet.BottomSheetDialogFragment | ||
import com.sopetit.softie.util.OriginalBottomSheet | ||
|
||
abstract class BindingBottomSheet : BottomSheetDialogFragment() { |
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.
짱짱 감사합니당!!
import com.sopetit.softie.util.binding.BindingAdapter.setImage | ||
import com.sopetit.softie.util.binding.BindingBottomSheet | ||
|
||
class OriginalBottomSheet : BindingBottomSheet() { |
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.
유틸로 만들어두셧군요 👍
} | ||
|
||
companion object { | ||
const val BOTTOM_SHEET_TAG = "BOTTOM SHEET TAG" |
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.
요거는 그냥 TAG입니다! 스트링 값!
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.
util까지,, 멋있다,,,
대신 몇몇 xml id에서 컨벤션 지켜지지 않은 것이 보입니다! 전반적으로 체크해주세요~
binding.btnSettingLogout.setOnClickListener { | ||
BindingBottomSheet.Builder().build( | ||
isDrawable = true, | ||
imageDrawable = R.drawable.ic_bear_face_crying, | ||
imageUri = "", | ||
title = "제목", | ||
content = "내용", | ||
isContentVisible = true, | ||
contentColor = R.color.gray300, | ||
backBtnContent = "돌아가기", | ||
doBtnContent = "그냥 해", | ||
doBtnColor = R.drawable.shape_red_fill_12_rect, | ||
backBtnAction = {}, | ||
doBtnAction = {} | ||
).show(parentFragmentManager, BOTTOM_SHEET_TAG) | ||
} |
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.
멋있다~
} | ||
|
||
companion object { | ||
const val BOTTOM_SHEET_TAG = "BOTTOM SHEET TAG" |
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.
요거는 그냥 TAG입니다! 스트링 값!
binding.tvUserExitSpeech.text = | ||
SpannableStringBuilder(getString(R.string.user_exit_title)).apply { | ||
setSpan( | ||
ForegroundColorSpan( | ||
ContextCompat.getColor( | ||
requireActivity(), | ||
R.color.red | ||
) | ||
), | ||
SETTING_SPAN_START, | ||
SETTING_SPAN_END, | ||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | ||
) |
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 initSetBear() { | ||
// TODO bear type 받아서 bear 이미지 띄우기 | ||
} |
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.
감사합니닷
app:layout_constraintEnd_toEndOf="parent"> | ||
|
||
<ImageView | ||
android:id="@+id/iv_user_security" |
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.
iv_setting_init_user_security로 고쳐주세요!
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.
네엡!! 제정신이 아니었던 것 같네요... 후다닥 수정하겠습니당
app:layout_constraintStart_toStartOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_user_security" |
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.
마찬가지입니다~ 해당 xml에서 id 컨벤션 한 번 확인 부탁드립니다!
app:layout_constraintEnd_toEndOf="parent"> | ||
|
||
<ImageView | ||
android:id="@+id/iv_document" |
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.
어째서 잠을 자지 않는 겁니까...
} | ||
|
||
companion object { | ||
const val BOTTOM_SHEET_TAG = "BOTTOM SHEET TAG" |
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
🛠️ Issue
📷 Screenshot
feat.setting.mp4
💬 To Reviewers
설정 뷰 '개인정보 처리방침', '서비스 이용약관', '서비스 이용 가이드' 부분은 전달받은 후에 추가하겠습니다
(+) 바텀시트 올라올 때 상태바 색 이상해지는 이슈는 후에 수정할 예정입니당(일단 기디쌤들께 말씀드렸습니당)
공통 바텀시트 만들었으니 바텀시트 사용할 경우에 참고해서 구현하시면 될 것 같습니다
사용방법
[ ex) drawable 사용 버전 ]
[ ex) Uri 사용 버전 ]
이렇게 drawable 파일을 사용하는 바텀시트가 있고, 서버통신으로 받은 Uri 파일을 사용하는 바텀시트가 있습니다
drawable 파일을 사용하는 경우 isDrawable을 true로 설정하고 imageDrawable에 값을 넣어주면 됩니다. Uri 파일을 사용하는 경우 isDrawable을 false로 설정하고 imageUri에 값을 넣어주면 됩니다
그리고 나머지는 각 뷰에 맞게 설정해주면 됩니다! 바텀 시트 사용되는 모든 뷰들 같이 보면서 달라지는 부분들 설정했는데, 혹시 사용하면서 잘 안되거나 빠진 부분 있으면 말씀해주세요!