-
Notifications
You must be signed in to change notification settings - Fork 2
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
[FIX/#148] OurTodo, MyTodo / QA 이슈 대응, Empty뷰 위치 설정 #154
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.
굿굿!!! 넘나 고생하셨습니다 :)
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.
오늘부터 이름 갓상호로 바꾸세요!
fun Activity.getWindowHeight(): Int { | ||
val wm = this.getSystemService(Context.WINDOW_SERVICE) as WindowManager | ||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { | ||
val windowMetrics = wm.currentWindowMetrics | ||
val insets = windowMetrics.windowInsets | ||
.getInsetsIgnoringVisibility(WindowInsets.Type.systemBars()) | ||
windowMetrics.bounds.height() - insets.bottom - insets.top | ||
} else { | ||
val displayMetrics = DisplayMetrics() | ||
wm.defaultDisplay.getMetrics(displayMetrics) | ||
displayMetrics.heightPixels | ||
} |
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.
ㄷㄷ.....이걸 생각해내다니
0 -> R.drawable.img_profile_6 | ||
1 -> R.drawable.img_profile_1 | ||
2 -> R.drawable.img_profile_2 | ||
3 -> R.drawable.img_profile_4 | ||
4 -> R.drawable.img_profile_5 | ||
5 -> R.drawable.img_profile_6 | ||
4 -> R.drawable.img_profile_8 | ||
5 -> R.drawable.img_profile_5 | ||
6 -> R.drawable.img_profile_7 | ||
else -> R.drawable.img_profile_8 | ||
else -> R.drawable.img_profile_3 | ||
} |
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.
못하는 게 뭐죠..??!!??!? 수고했슴당!!!!!!
|
||
const val IS_FIRST_ENTERED = "isFirstEntered" |
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 setEmptyViewHeight() { | ||
binding.appbarOurTodo.addOnOffsetChangedListener { appBarLayout, verticalOffset -> | ||
val displayHeight = activity?.getWindowHeight() ?: return@addOnOffsetChangedListener | ||
val toolbarHeight = binding.toolbarOurTodo.height | ||
val appBarHeight = appBarLayout.totalScrollRange + verticalOffset | ||
binding.vpOurTodo.layoutParams = (binding.vpOurTodo.layoutParams).also { | ||
it.height = displayHeight - toolbarHeight - appBarHeight - 300 |
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
📸 Screenshot
KakaoTalk_Video_2024-01-17-23-54-15.mp4
📢 To Reviewers