Show all tabs in Android Studio - android-studio

Is there a way of showing all source code tabs in Android Studio one one horizontal line (in the tab bar) and scroll through them?
When there are too many source code tabs open in Android Studio, some of them are moved to the drop down list at the top right corner of the code edit window. The tabs that are moved to this drop down list are not shown in the tab bar any more.
The tabs in the tab bar can be scrolled with the mouse wheel, but only the ones that have not been moved to the drop down list.
Is there a way to remove the drop down list and keep all tabs in the tab bar?

Not sure if this feature was introduced in later versions of studio (than at the time of which this question was asked) but now you have option to show tabs in multiple rows. You can do so by
Windows -> Editor Tabs -> Tabs placement -> Show Tabs in single row
You can uncheck above which is checked by default. Snapshot below -

In android Studio 4.0.1 you can find tabs configuration in:
Window->Editor Tabs->Configure Editor Tabs...
After, uncheck "Show tabs in one row" checkbox if it is selected.

The size of the tab bar is fixed and there are only fixed number of tabs that can fit inside that limited area.So, one way to quickly switch between the open tabs is to use the SWITCHER tool of Android Studio.
Press control + tab in MAC (don't know the shortcut for windows) and it will bring all the classes and other files which are currently open and you can efficiently switch between them without even touching your mouse or touchpad.

For Linux you can do similar to MAC

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 to restore VBA Editor to its initial settings?

How to restore the VBA Editor to its intial settings ? I have some troubles with macro and projects explorer windows settings, after some bad manipulations.
The only way I know how to accomplish this is to edit the registry.
Close All Office programs
Open a command prompt and type regedit
Navigate to HKEY_CURRENTUSER\Software\Microsoft\VBA\6.0\Common
Right click on Common and Export to save the *.reg file somewhere safe. This is your back up. Double clicking this file will restore your current settings.
Right click on Common and Delete it. Doing this will remove all of
its subkeys that hold your personal settings.
The "Common" key will be recreated the next time you close the VBA Editor along with any changes to the settings you may make.
I have the same issue, it's simple:
TOOLS
OPTIONS
DOCKING
Then select Object Browser, Project Explorer and that's all.
I had the same problem and realised that if I double click the blue heading of a minimal floating menu, such as the Project-VBAProject menu, it would resize and fit in with the other menus that are expanded. With a bit of moving around and double clicking the headers of the menus that I had selected from the VIEW option, I could get the screen back to the way it originally looked at the default setting of the VBA editor.
Phil
Solution Using a Mac and Excel 2016.
I found that I could drag the, e.g., project explorer (pe) window toward the edge of the vb window and the outline of the pe window moves and adjusts once you get close enough to the edge. This also works with the other windows as you bring them into view.
My default view is project explorer upper left, properties lower left. To return these to be in that order, drag the one to that location (which will fill that whole area) then drag the other one right on top of that one. That stacks them in the same column and then you can adjust their size within those locations.
I had this same issue and fought with it for literally 2 days. Finally figured it out!!!
xD First close the Project Explorer and the Properties windows using the X at the top right. Then go to Options under the Docking tab. Uncheck all boxes. Close the options window and if desired check to see that everything is undocked. Now go back to Options>Docking and check all the boxes you had checked (default is all but object browser). Your windows should have returned to default.
This may not solve the OPs original question of "default" for all, but in my case and possibly others I was looking to re-dock the "Project Explorer" and have modules pop up next to it like default. I'm not sure about other settings, but this is how I restored the above behavior.
In the project explorer right click and select "Dockable". Then insert a module and maximize it. This should restore what I consider default behavior.
Actually, it is very easy. You just have to go to View Tab then Click on the Project Explorer & Properties Window. It worked for me because I lost these two and now I got it by doing this. I hope so you will get the same result as well. View the image for more clarity.
Simple steps. Works for Mac , maybe windows too
Close all the tabs in the VBE
View --> Code . This will occupy entire space
After that ,view --> project explorer. this will pop up a tab, drag that tab to the top left corner. It auto fills into a small column which you can drag according to your preference .
Now select view --> properties window and drag the tab to bottom left.
Additional step ( if you use locals window )
Select locals window from view and drag it to the bottom.
Right click any of the window you want to move and click "Dockable". This should allow you to move all the windows as you want and place them as you wish.
I had all menus and windows missing, like no "File", no "Edit", no "View", etc.
Here's what I did:
Closed Excel
Opened the Registry Editor
Navigated to HKEY_CURRENTUSER\Software\Microsoft\VBA
Right clicked on VBA and renamed to VBA_old
Closed the Registry Editor
Opened Excel
Opened Visual Basic
…and voila, VBA was back to normal!
After that, I:
Reopened the Registry Editor and saw that VBA had been recreated
Deleted VBA_old
I'm not aware of a 'reset' command but the starting point would be to go to the View menu and start by setting the Code, Project Explorer and Properties windows and then the Toolbars>Standard (toolbar) perhaps?

Switching TabHost Tabs in Android Studio UI Designer

How can I switch between the tabs of a TabHost in the UI Designer for inserting content? Is there a keyboard shortcut or something else
I found a way to visualise any tab using TabHost in the UI Designer. Is probably not the best way, but it works.
1. Go to the Component Tree, where you have all the elements of the UI.
2. Inside the FrameLayout that TabHost automatically creates for you, there are the tabs.
3. If you change the order of the tabs just drag and dropping in the Component Tree, you get to see the one that is placed in the first position.
UPDATE:
According to this answer there is no way to change the tabs of a TabHost. That question refers to IntelliJ; I don't know if it applies to Android Studio.
Also, it seems that TabHost has been replaced by FragmentActivity and ActionBar. See Android how can i replace the deprecated tabhost? for a discussion.
It is defined as "Select next Tab in multi-editor file" in Settings -> Keymap.
On Windows it seems to default to CRTL+SHIFT+RIGHT/LEFT or ALT+SHIFT+RIGHT/LEFT. On my Mac it defaults to CTRL+SHIFT+RIGHT/LEFT.
Note that Studio doesn't allow the default Keymap to be edited so you will first need to copy the default and give it a new name.
Also see Shortcut to switch between design and text in android studio.
By mouse, select the FrameLayout then long left click on any space in it.

How re-enable design palette in Android Studio

I recently made the switch to Android Studio as my default IDE for Android development. When designing my UI I normally use the palette in the design view to assist in arranging the widget on the preview screen.Recently something weird happened, It just disappeared and I can't seem to re-enable it. Normally I would see the little Palette button on the side but now its gone. When I open another project I see the palette but not show this current project I'm working on.
When I open another project in Android Studio I see the palette tab.
I've just figured this out! If you double click on your .xml file tab at the top it will maximize the designer window. Then on the left you can drag the window to shrink and it will reveal the palette. Then just click on the tab on the left to open the project window.
try the Design/Text tabs in the lower left of the layout window
The palette can be shrunk to 0 width. This can be expanded by hovering next to the left edge of the design window, and finding the right-most expand position.
If you have only the designer and the properties showing and the Properties is on the right, you can get the palette back by switching to a left or right view.
Right click on the .xml file tab. Select "split vertically". This will open another Design that shows the palette again.
Android Studio 2.3.3, and the answer I was looking for:
Window -> Restore Default Layout (Shift+F12)
First Close All The Tabs Then Open res->layout->activity_main.xml
you will able to see design tab at activity_main.xml
Try to switch between Design/Text tabs at the bottom left of the editor.
You must have something in the layout resource highlighted. I also had to compile without an error.
My solution was traversing
src->main->res-layout->content_main.xml
then open content_main.xml
You have to be in the 'Design' tab (as opposed to the 'Text' tab) at the bottom of the middle window (the one that shows the phone).

Create DUPLICATE code window in visual studio 2012

I want one code window to have two duplicates. I want to place one code window on one monitor, and second code window on the second, extended monitor.
As I Go on typing, I want second window to display the code that I type on the first monitor. Is it possible in visual studio 2012?
It would be very helpful for me while teaching the trainees.
I haven't got a copy installed here to test but I believe the answer you're looking for lies hidden under the Window menu..
Activate the window you wish to duplicate and under Window on the toolbar choose New Window. This will create a duplicate of the active document. Under the Window menu again you should find the option to make the window Floating
Update for Visual Studio 2013: Vertical split of cshtml window in VS2013
In VS2012, the feature closest to what you are after is called "Split" and its under the Window menu when you have a code file selected. This creates a split view of the selected code file within the original window.
I don't know of any way to seperate the copies from each other and float them on different screens.

Resources