View XML code in Android Studio. By default, in Android Studio Narwhal | 2025.1.1 Patch 1 what is shown is the layout of the XML. Android Studio, provides 3 options for previewing the XML. 1 - View by code Only 2 - View with XML code and the output or the layout 3 - View only the output of the XML or view the design only To select these options once an XML or layout file is opened. The options can be found on the top right of the screen, just beside the current XML file that os being viewed. See this screenshot below on how it looks like: Hope it helps. Life is a gift. Life is a journey. Trust the Almighty, Pray always.
Make the world a better place by sharing knowledge, ideas and anything that you can give that comes from the heart.