Reputation: 432
I use keymaps in Android Studio to save time.
To open "Recent Files" I happen to use the keymap of CMD
+ E
, which will open the "Recent Files" pop-up screen.
The problem is that when I then select any of the .xml layout files from this screen, it opens the file by default in "Design" mode, instead of "Text".
I prefer to code my layouts in "Text" mode. This means I then have to keyboard shortcut CTRL
+ SHIFT
+ ->
every time to edit the layout in "Text" mode. How do I open "Text" mode by default.
Note: I would post images, but that is reputation dependent...
Upvotes: 43
Views: 4515
Reputation: 2529
Updated instructions for Android Studio Ladybug Feature Drop | 2024.2.2
on MacOS:
Upvotes: 3
Reputation: 113
Currently it's can be found under "Preferences" -> "Editor" -> "Design Tools" -> "Default editor mode" section
Upvotes: 7
Reputation: 4335
On Mac: Cmn + Shift + A -> prefer XML...
On Win/Lin: ctrl + Shift + A -> prefer XML...
Upvotes: 0
Reputation: 363
In Android Studio 3.0 for MacOS
Android Studio -> Preferences -> Editor -> Layout Editor
Upvotes: 2
Reputation: 37969
Open Settings:
File -> Settings -> Editor -> Layout Editor -> check the checkbox "Prefer XML Editor"
Upvotes: 78
Reputation: 83
In newer versions of Android Studio you can find the setting mentioned by Andrey under Preferences > Editor > Layout Editor. ("Prefer XML editor")
A restart is not required.
Upvotes: 7