No more toolbar, sidebar, status bar, or even the menu bar. Just plain old distraction-free environment to stay focused and productive while still being able to switch tabs and bring up panels as needed (💡 ⌘+Number toggles panels. Ex: ⌘+1 to toggle the project panel).

For the perspective, here’s the what it looks like by default by the way:

Default view with “everything on it”.

The solution is simple: we want to create a macro and assign a shortcut to it. Here is how:

1. Create a Macro

To get above screenshot, I have created this Macro:

Macro: Distraction Free

Here are the actions in this Macro:

View > Toggle “Toolbar” View > Toggle “Tool Buttons” View > Toggle “Status Bar” View > Toggle “Navigation Bar” View > Active Editor > Toggle “Show Gutter Icons”

In case this is your first time creating a Macro, here is how to create one:

From Edit Menu > Macros > Select “Start Macro Recording”. Perform all the actions that we would like this macro to do. Since this particular macro only involves toggling a bunch of options under the View menu, we will just be opening View and hitting the option we want to toggle. Once we are done with all 5 Actions, stop recording the Macro from Edit > Macros > Stop Macro Recording. That’s it. Name this macro and we are done.

We can now run this macro to toggle our version of the Distraction-Free mode.

2. Assign a Keyboard Shortcut:

It would be pretty inconvenient if we had to run this macro from Edit menu every time we want to toggle, right? There’s an easy way to solve this: Assign a shortcut to a menu item.

Android Studio Preferences > Search “Distraction Free” (the name of our macro)

Here is how:

As shown in the screenshot, open preferences > search for the name of our macro.

Now we can add a shortcut to our Menu item “Macro > Distraction Free” by double-clicking on that menu and assigning a shortcut.

As you can see, I assigned ⌘+ Shift+0 to my macro.

That’s it. Our distraction Free mode is now ready. Keep hitting ⌘+Shift+0 and have fun!

Extra Goodies:

Code + Panels (who can live without panels?)

Using Logcat and other panels such as file browser, Debug window, etc are much more convenient in this mode.