Shortcut to switch between design and text in android studio

怎甘沉沦 提交于 2019-11-27 11:01:26

问题


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.


回答1:


You can find it in Settings->KeyMap

"Select next Tab in multi-editor file" CRTL+SHIFT+RIGHT (it may depend by platform).

You can change it.




回答2:


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




回答3:


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

CTRL + SHIFT + LEFT/RIGHT on MAC




回答4:


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

(Mac) : control + shift + ← / →

(Windows / Linux): alt + shift + ← / →




回答5:


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.




回答6:


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

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




回答7:


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




回答8:


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



回答9:


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




回答10:


ALT+SHIFT+RIGHT ARROW worked for me on ubuntu




回答11:


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




回答12:


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

CTRL + B

Period.




回答13:


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



来源:https://stackoverflow.com/questions/20682455/shortcut-to-switch-between-design-and-text-in-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!