Shortcut to switch between design and text in Android Studio

AndroidIntellij IdeaAndroid StudioKeyboard Shortcuts

Android Problem Overview

Does anyone know some shortcut to switch between design and text in android studio while editing XML layout?

While I can switch from design view to source using Ctrl+B (and need to select something in layout before), I have no way to go back.

Android Solutions

Solution 1 - Android

You can find it in Preferences->KeyMap:
"Select next Tab in multi-editor file":

enter image description here

The keymap depends on the platform:

  • On windows/Linux it is ALT + Shift + Left/Right.

You can change it on the KeyMap panel.

You can find the buttons to switch between design, text and preview in top right bar:


With Android Studio Arctic Fox 2020.3 you can find the buttons to switch between code|split|design:

enter image description here

Solution 2 - Android

ALT + Shift + Left/Right works for me. (Windows)

Solution 3 - Android

ALT + SHIFT + LEFT/RIGHT on windows and ubuntu.


Solution 4 - Android

Move between Design / Text tabs in layout’s view:

(Mac) : control + shift + /

(Windows / Linux): alt + shift + /

Solution 5 - Android

Good Question:

There are 2 ways:

  • If You are on a Activity ( Design or Text)

    1. left click on Text or Design
    2. ALT + SHIFT + Right/Left arrow key
  • If You are on a class

    1. click on the name of the activity: example: click on activity_actividad2_blank setContentView(R.layout.activity_actividad2_blank);

    2. click on Project goto to java class left click on class and click on "Find Usages" ( Or ALT + F7) double click on result you want to go.

Have a good programming.

Solution 6 - Android

In Windows it's ALT + SHIFT + Left / Right for Android Studio 3.4

Solution 7 - Android

> (CTRL + SHIFT) + LEFT or RIGHT arrow keys,

To go back and forth in between Design tab and Text(XML) tab, on Mac OS X.

Solution 8 - Android

Although the question is related to switching between design and xml views, many people may be looking for or interested in how to switch between related XML and Java files. This can be achieved in Android Studio, using the Related Symbol... navigation key mapping.

Depending on your settings and operating system the keyboard shortcut will vary, but you can find out what yours is by looking in Settings -> Keymap -> Main menu / Navigate / Related Symbol...

Otherwise try the following keys:

  • Ctrl + Alt + F7
  • Ctrl + Alt + Home
  • Meta + Ctrl + Up

Solution 9 - Android

ALT+SHIFT+RIGHT ARROW worked for me on ubuntu

Solution 10 - Android

alt + shift + left/right arrow keys worked for me in Windows 10 in Android Studio 3.5.

Solution 11 - Android

The settings for it is under Settings->Keymap->Other->Select Next Tab in multi-editor file, for Android 3.0.1.

Solution 12 - Android

I wanted to switch to the selected View in question. None of the answers did that. So, here we go:



Solution 13 - Android

On Android Studio 2.3+, one can use the shortcut Ctrl+T.

Solution 14 - Android

Buttons are available to switch between design and text window in XML file in android studio 3.6.1. Shortcut keys are: ALT + Shift + Left/Right works for me. (Windows)

Top Right side buttons


All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMainActivityView Question on Stackoverflow
Solution 1 - AndroidGabriele MariottiView Answer on Stackoverflow
Solution 2 - AndroidcifuentesView Answer on Stackoverflow
Solution 3 - AndroidShivanshView Answer on Stackoverflow
Solution 4 - AndroidTharinduView Answer on Stackoverflow
Solution 5 - Androiduser3220499View Answer on Stackoverflow
Solution 6 - AndroidMohamed AbulnasrView Answer on Stackoverflow
Solution 7 - AndroidRandika VishmanView Answer on Stackoverflow
Solution 8 - AndroidTheITView Answer on Stackoverflow
Solution 9 - Androidnoushad_chullianView Answer on Stackoverflow
Solution 10 - AndroidVivek Pratap SinghView Answer on Stackoverflow
Solution 11 - AndroidfelixyView Answer on Stackoverflow
Solution 12 - AndroidManish Kumar SharmaView Answer on Stackoverflow
Solution 13 - AndroidJayView Answer on Stackoverflow
Solution 14 - AndroidAli Sher KashifView Answer on Stackoverflow