Others

Table of Contents


Hide and Restore windows

You can define a default layout using the Menu Bar.

Because of the debugger and Android Monitor opens by itself, sometimes, you want to close those windows rapidly. Well using:

⌘ + ⇧ + f12 you will hide all the windows in order to be focused on the Editor, but if you want to restore the layout you’ve been saved as default, you only need to use ⌘ + f12

Presentation mode

Distraction mode

⌃ + ⌥ + ⌘ + f (Custom keymap)


Live templates and code completion


Documentation

Using F1 key in code/resources, you will be able to see documentation of the method/class resource in which the cursor is placed to:

Layout sample Class sample

If you use it for styles, it also tells you the entire inheritance structure of the selected style

Styles sample









Structural Search, Replace, and Inspection (THIS MUST BE IN NAVIGATION SECTION)

It allows you to search for, and replace, code patterns (based on templates). Very useful for code smells.

// WORK ON THIS SECTION, LOOKING AT THE VIDEO here

An example could be:

Timber.log($text$)

// THIS TEXT IS COPIED. DELETE Moreover you can enable Structural Search Inspection. You can then save a Structural Search Templates that will flag code that matches that pattern warning, displaying the hint text you provide.

Even more powerfully, you can create Structural Replace Templates. Like Structure Search Templates, the pattern will be flagged as a warning — but in this case, the replacement code will be offered as a quick fix!

This is perfect for creating quick fixes for deprecated code, or common anti-patterns in code your reviewing, or which is being submitted by other team members.


Default

Every time you need to open an external text editor just to edit some text before pasting it into a code editor, you should use a scratch buffer. You can easily create a new buffer with the “Find command by name” dialog. Also, when you close the buffer you always can reopen it with the “Recently edited files” panel.

In addition to this feature AS also has a scratch files function. The main difference between scratch buffers and files is that with files you can choose the syntax of an edited text and editor will correctly highlight it.


Custom

You presses button on toolbar, or to launch from the following shortcut.

Windows, Linux: Ctrl + Shift + Alt + V Max: Cmd + Shit + Alt + V

Command ⌘ Shift ⇧ Option ⌥ Control ⌃ Caps Lock ⇪ Fn ← ↑ → ↓