I'm trying to use this layout component . I just don't know how to register a callback. I need to register the onDismissFinished callback but I'm at a loss. I'm working in Java, Thanks.
There are plenty of examples on github.
For example using viewBinding
ActivityMainBinding.inflate(layoutInflater).apply {
setContentView(root)
swipeDismissRootContainer.registerCallback(object :
DismissibleFrameLayout.Callback() {
override fun onDismissFinished(layout: DismissibleFrameLayout) {
// Hides view before exit to avoid stutter.
layout.visibility = View.GONE
finish()
}
})
https://github.com/search?q=DismissibleFrameLayout&type=code
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.