Hello There I started learning Kotlin language. In the past, design and so on via layout.xml. We were making things and automatically adding them to the project. Now I want to create a new layout.xml in the new version and include it in the project, but it doesn’t work. how can I do it ?
I tried most of chatgpt etc. AIs but I couldn’t get any results even from them.
2
Answers
Your question is unclear please specify in more details i.e. What issue you facing, what’s not working etc.
Do you mean you want to create a new layout.xml file?
The "Empty Activity" new-project wizard in Android Studio Giraffe now creates a Jetpack Compose project.
To create a Views-based project (that use xml files to define layouts), select one of the templates that has "Views" in its name.
Once you have a Views-based project, you can add new layouts by creating files inside the
app/src/main/res/layout*
folders.(I recommend taking a look at Jetpack Compose for new projects or adding new UIs to an existing application. It’s a much nicer experience.)