Editor window loses focus on shortcut view change - android-studio

In Android studio, while having a .xml file (layout) open in editor window, there are two modes available: Design and Text. In Mac the short-cut for going back and forth in these views are said to be Control + Shift and Left/Right. However once you press one of these combination the editor window will lose the focus and in order to go back, you have to click on the editor window.
How can one resolve that without the extra click?

Related

Make XML Split view default in Android Studio 3.6+?

In Android Studio 3.6 and above, an XML file always opens in the "Code" view by default. How do I make it open in "Split" view by default?
UPDATED
Now for Android Studio "Arctic Fox" - Preferences -> Editor -> Design Tools. Nice!
In Android Studio 3.6 if you open Preference->Editor->Layout editor you can see for this case only check/uncheck "Prefer XML editor" for show modes "Code" or "Design" view without "Split", very strange... Waiting for possibility check mode "Split"
UPDATED
Now Android Studio 4.0 has "Split" option. Nice!
Here's what worked for me, hope it works for you too.
Close all tabs in your editors.
Open one xml file and click on the split view button at the top-right section of the tab.
Close the tab again.
Android Studio then remembered my selection for all other tabs opened from then on.
Using the keyboard shortcuts (Ctrl + Shift + Left/Right Arrow if you are on a Mac, or Alt + Shift + Left/Right Arrow otherwise):
Code: provides the functionality of an XML text editor.
Design: consists of a view containing the design editor (e.g. navigation graph, layout) that can be used to edit the file graphically.
Split: displays both Code and Design side-by-side, so you can preview your design while editing the text.

How can you keep the Structure window always displayed in Android Studio 3.5.1?

I'm sure that I open the Structure window in my Android Studio 3.5.1 project, you can see Image 1, but sometimes Android Studio 3.5.1 hide the Structure window automatically.
I hope to keep the Structure window displayed. How can I do?
Image 1
According to the docs you just need to choose Dock Pinned as View Mode of the Tool Window:
You can make a tool window stay open even if your focus is somewhere else, for example, in the editor or other tool window. To achieve that, use the Dock pinned mode when you select your viewing mode.
Here are the steps to change it:
On the title bar of a tool window, click the Show Options Menu icon, from the list of options, select View Mode and the actual mode option.
Right-click a tool window or a title bar and from the list of options, select View Mode and the actual mode option.

View tabs during ctrl-tab in Sublime Text?

In Windows, when you press Alt and Tab together, then repeatedly press Tab while holding down on the Alt, you see a list of all open windows and you can toggle between them.
In Notepad++ and other editors, you can do the same thing with editor tabs using the Ctrl+Tab combo.
Question:
Although Sublime Text supports basic Ctrl-Tab, it doesn't support the ability to view a list of all the tabs while keeping the Ctrl tab held down (as does Notepad++). Is there some plugin that provides this functionality, or an alternate key-combination I'm not aware of?
Tabs are just open files, to view a list of your open files View -> Sidebar -> Show Open Files

Android studio documentation popup

Is there a way when documentation popup on AS to not hide immediately after it is showed by moving mouse on some class. What I mean. I move mouse cursor above Activity class and documentation is popup is showed, but when I try to move mouse above this popup (because I have to scroll it) it disappears. I can hold ctrl and then is will not hide, but if I press on it while holdint ctrl down it will disappear (so I should move cursor above it, release ctrl and after that to start scrolling). So is there an option to change this behaviour to be like in eclipse - documentation pop up is showed and if you move mouse above it you can scroll, otherwise it is closed.
There are a lot of bugs surrounding this UI element. I'm currently having the opposite problem where it won't go away unless I manually close it. I suspect in your case, a timeout is triggering too early, or some other event is erroneously hiding the window.
This workaround may be helpful. You can explicitly pop the documentation window from the View > Tool Windows > Documentation menu option. This will cause the tool window tab to appear on the right gutter by default. Right-clicking on the Documentation tab will pop up a menu that will allow you to pin the window, or dock it permanently in the UI by disabling "Floating Mode" and optionally moving it to the other side or the bottom.

Android Studio: Create a second Windows window

I am getting familiar with Android Studio and now prefer it over Eclipse. However I find the window handling of Eclipse more efficient and flexible.
Is there any way to open a second window for the same project (like you can if you have separate projects)? Basically the "New Window" function of Eclipse.
Is there any way to store different window layouts and switch quickly between them (like the perspective of Eclipse)
I am developing on a Notebook, so space is limited. I rather switch with Alt+Tab between IDE windows than resizing 5 docked windows.
Opening a separate window (Qn #1)
This is possible. For an existing window tab, click and drag the tab outside of the window area of Android Studio. This is easier if the Window is in a restored state. So:
Ensure that there's some desktop area that's not covered by Android. This could be by ensuring the Android Studio window is not maximized (as you'd do on your notebook), or by having a dual-monitor setup.
Bring the window to be 'floated' to be the active tab
Drag the window outside of the Android Studio window area, and release mouse.
The window is now floating. To make it tabbed again, just drag it back to be where it was (beside other tabs).
Alt+Tab navigates between floating windows and the main IDE window.
Floating tool windows
Tool window tabs can be dragged in the same way:
... such that they float like this:
Window layouts (Qn #2)
It appears that there's only the option of a 'Default' layout, and after changing this (e.g. pinning tool windows), the option to revert to a previously saved 'Default' layout.
To save a layout, select 'Window' -> 'Save Current Layout as Default'. Now after re-arranging any tool window layouts, the saved layout can be restored via 'Window' -> 'Restore Default Layout'
Tool windows such as '1. Project', '2. Favorites', 'TODO', 'Terminal' etc. can be dragged to be in different border areas of the application. It's the arrangement of these tool windows that is affected by the layout feature.

Resources