How to use Custom Dialog xml based in Compose in jetpack compose

565 Views Asked by At

I have existing Dialog view in xml based. I want to use Dialog view in my Compose feature. Is it possible to do that? If yes, Can you provide me any guidance? example would be great.

1

There are 1 best solutions below

0
jayesh gurudayalani On

Have you tried with this way

https://developer.android.com/jetpack/compose/interop/interop-apis#compose-in-fragments

basically they suggest to use AndroidViewBinding which is provided by the androidx. compose. ui:ui-viewbinding library

example is showing in fragment but you can just use it in dialog as you just need to use binding