-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Modern Android 13 Development Cookbook
By :

Since Compose is a new UI framework, many code bases still rely heavily on XML layouts. However, many companies are opting to build new screens using Compose, and this is achievable by utilizing existing XML layouts and adding unique views using ComposeView
XML tags. This recipe will look into adding a Compose view to an XML layout.
In this recipe, we can create a new project or opt to use an existing project that does not heavily rely on Compose. We will try to display GreetingDialog
and use an XML layout to show how we can use the ComposeView
tag in XML layouts. If you already have a project, you do not need to set this up; you can skip to step 4 in the preceding How to do it… section.
Now let us go ahead and explore how we can utilize existing XML layouts with Compose: