-
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
[fix] multiple touch #200
[fix] multiple touch #200
Conversation
# Conflicts: # app/src/main/java/com/sopt/geonppang/presentation/filterSetting/FilterSettingActivity.kt
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.
λ μ§μ« λ₯λ ₯μλ€
ViewPager2.OnPageChangeCallback() { | ||
override fun onPageSelected(position: Int) { | ||
super.onPageSelected(position) | ||
viewModel.setCurrentPage(position) | ||
} | ||
}) | ||
ViewPager2.OnPageChangeCallback() { | ||
override fun onPageSelected(position: Int) { | ||
super.onPageSelected(position) | ||
viewModel.setCurrentPage(position) | ||
} | ||
}) |
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.
ktlint μ€λ₯ λλ κ±° μ¬κΈ° λλ¬Έμμ ν μΉΈμ© ν λλ¬μ€μΌν¨
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.
γ μ΄κ±° μ§μ§ νλ¨..
inline fun View.setOnSingleClickListener( | ||
delay: Long = 500L, | ||
crossinline block: (View) -> Unit | ||
) { | ||
var isClickable = true | ||
setOnClickListener { view -> | ||
if (isClickable) { | ||
isClickable = false | ||
block(view) | ||
view.postDelayed({ | ||
isClickable = true | ||
}, delay) | ||
} | ||
} | ||
} |
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.
κ°μ©λ€ ν΄λ¦νκ³ λλ μ΄ μ€μ κ·Έ μκ° λμ ν΄λ¦ μ λλλ‘ νλ κ±° λ§μ??
Related issue π
Work Description βοΈ