Closed cherimo closed 3 years ago
Related topic is https://github.com/google/ExoPlayer/issues/8369 but unfortunately this doesn't seem to help with data bind either. I have a temporary workaround now with synthetic but I would like to fix this in a short term with view binding.
I think this is a duplicate of https://github.com/google/ExoPlayer/issues/5417, but please let us know if this is not the case. Thanks!
Hai, I'm using Android Exoplayer in my Android app and tried to use the view binding for the custom layout. Within Exoplayer I use a custom control layout"@layout/custom_player" for the controls. I have different elements within the layout for example I have a button element"optionBtn" which I want to connect to onclicklistener from my Kotlin code. Unfortunately that doesn't go very smoothly with view binding.
This is the XML Exoplayer
This is the kotlin code
... private var binding: FragmentVideoBinding? = null private var btnsheetOptions: SheetOptionsBinding? = null private var sheetDialog: BottomSheetDialog? = null private var customPlayer: CustomPlayerBinding? = null
... This way the layout is double-inflated on top of each other and one layout works with onclick listener and the other does not, which is not very useful.
Does anyone know the correct solution for this, I've been working on this for almost all afternoon.