Hotkeys Android Studio

Already a year since I started trying to program for Android, and all year I was supported by a good friend of Android Studio . Of course, I would move much faster if I knew green more about hotkeys, but at one time I did not find a complete and understandable directory of important IDE hot keys, and therefore I wrote it myself. There are far from all combinations in it, only those that seemed useful in work, with the exception of Ctrl + C, Ctrl + V, Ctrl + X and Ctrl + Z. I submit it to the public and for general use here:

  • Quick bug fix Alt + Enter

    Displays a window with options for displaying errors, if more than one.

  • Wrap in ... / Surround with ... Ctrl + Alt + T

    List of more than ten options. Here you have try-catch and if / else, and synchronized, and Runnable ... So to speak, a wrapper for every taste.

  • Information about the current class / Context info Alt + Q

    Name, visibility, abstract, parents - full dossier.

  • Change signature / Change signature Ctrl + F6

    A very convenient tool, even if the task of the egg is not worth it.
    Screenshot for clarity

  • Recent changes in the project / Recent changes Alt + Shift + C

    Not very detailed, but will help to remember.

  • Display type hierarchy / Type hierarchy Ctrl + H

    Displays the type tree right up to the top, i.e. to the one the pointer is on.
    An example instead of a thousand words

  • Go to source / Jump to source F4 (Win) / CMD + down-arrow (Mac)

    Comments are unnecessary

  • Go to Ad / Go to Declaration CTRL + B (Win) / CMD + B (Mac)

  • Go to Parent / Go to Super CTRL + U (Win) / CMD + Y (Mac)

  • Search by item name / Search by symbol name CTRL + ALT + SHIFT + N (Win) / OPTION + CMD + O (Mac)

    Sometimes too long, and sometimes just necessary

  • Show API documentation / Show docs for selected API CTRL + Q (Win) / F1 (Mac)


  • Show parameters for selected method Ctrl + P


  • View item definition / Quick definition Ctrl + Shift + I


  • Reformatting the code / Reformat CTRL + ALT + L (Win) / OPTION + CMD + L (Mac)

    Allows you to optimize imports (optimize imports) and reorganize code fragments (rearrangement entries) at the file level, directory or just the selected text. Code reforming includes grouping overriden methods by class / interface, grouping getters and setters, as well as ordering methods by depth of entry (for example, if the foo () method calls the bar () method in its body, the bar () method will be transferred immediately under the foo () method, if this does not violate the code structure) and a useful trifle such as a space at the beginning of the substring to be glued to the end. Reorganization is quite flexible through File | Settings | Code Styles, select Java in the drop-down list and go to the Rearrangement tab.

  • Generate method / Generate method ALT + Insert (Win) / CMD + N (Mac)

    Designers, getters / setters, equals (), toString and override method and delegate method functions are offered for generation. In general, it is very cool and beneficial for the body.

  • Build CTRL + F9 (Win) / CMD + F9 (Mac)

    Just builds.

  • Build and Run SHIFT + F10 (Win) / CTRL + R (Mac)

    Not only builds.

These are the most useful, in my opinion, hotkeys that I used or would use if I had known about them before. To summarize, Android Studio has great potential for the so-called "invisible interface" that makes life easier for simple encoders.

PS Note to beginners from a beginner: If you are used to Ctrl + Z - undo and Ctrl + Y - undo undo, wean! The cancellation is really Ctrl + Z, but the cancellation is cancellation Ctrl + Shift + Z.

Also popular now: