Ankit Kumar

Hi folks, this article is all about how to use jetpack compose and xml together , so that compose can be used in old xml projects
Also there are few things which is not being supported in Jetpack compose so far eg: Maps , and to use that in compose we need to use xml views
Credits : Youtube
So let’s get started

Modify your existing build.gradle to use compose in it

Below is layout file of activity / fragment, we have a simple TextView used in xml and a composeView which gives a compose view where we will inflate layout with compose

In your activity / fragment class

Thanks for reading the post 👏

--

--