Android Studio shortcut keys

Source: Internet
Author: User

File operation:

    • Alt+shift+r
      Rename a file, equivalent to right-click a file->refactor->rename, two-step operation to change one step
    • Ctrl+shift+c
      The absolute path of the copied file over the entire disk
    • Ctrl+alt+shift+c
      Copy the file in the current project's path, that is, on the absolute path basis, the "project name/" and the previous part of all removed
    • Ctrl+f4 or shift+ click the window title
      Close the current window
    • Ctrl+shift+f4
      Close all windows

Text editing:

  • Ctrl+d
    Delete the row where the cursor is located and place the cursor on the next line
  • Ctrl+shift+delete
    Remove from cursor to end of line
  • Ctrl+delete
    Remove from cursor to end of word
  • Ctrl+backspace
    Remove from cursor to Word header
  • Shift+enter
    Adds a blank line below the line at the cursor and moves the cursor to the beginning of the new line, eliminating the action to move the cursor to the end of the current line
  • Ctrl+alt+enter
    Adds a blank line above the line at the cursor and moves the cursor to the beginning of the new line
  • ctrl+/
    Comment on each line, either commenting the Java code or commenting out an XML code
  • ctrl+shift+/
    Block annotations, valid for both Java and XML
  • Ctrl+alt+l
    Automatic Formatting code
  • Ctrl+alt+o
    Clear Invalid Import

Very useful page Jump:

  • ALT + LEFT ARROW/right Arrow
    Back/forward to the upper/next cursor position, CTRL + Click at the call of a method or class, jump to view the details, you can go back to the original call, you can also cross the page!
  • CTRL +]
    Cursor jumps to code block trailer
    For the left half bracket [ibid.

  • Ctrl+alt+s
    Open the Settings screen

  • Ctrl+shift+]
    Select from the cursor until the end of the current code block, which is the previous position in the "}".
    In practice, you can resolve an issue where you cannot find the end of the "}" to use a block of code.
  • Alt+shift+x
    Run the app or the current class (depending on the selection)
  • Alt+shift+d
    Debug app or current class (depending on the selection)


  • Double-click Shift
    Full Engineering Search
  • Ctrl+shift+r
    Open File by file name
  • Ctrl+e
    Open a recently viewed file
  • Alt+enter uniform to Strings.xml or dimens.xml at the XML hard-coded string or dimension value cursor

In the class list of Android studio, for the identity of different class files:

    • For the interface, the green background of the "I" is expressed;
    • For abstract classes, the upper left corner of the 1/4 Circle is expressed in green;
    • For final class, the upper left corner is indicated by a white point;
    • Other general classes are represented by the blue background "C".

Android Studio shortcut keys

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.