Android-Studio to show XML code instead of design

Solution 1:

Newer (I guess 2.x+) versions of Android Studio have this option in the main settings:

Open the settings with one of the following actions:

  • Press Ctrl+Alt+S.
  • On the main menu, choose File | Settings for Windows and Linux or IntelliJ IDEA | Preferences for OS X
  • Press Ctrl+Shift+A, type settings and press Enter.

Then navigate to the following sub-menu:

Editor -> Layout Editor -> "Prefer XML editor"

Screenshot of the Preferences

Solution 2:

This has been added in the newest release of Android Studio (0.8.12).

default to xml editor

Other features of the new release can be found here.