Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the common shortcut key function of Android Studio

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what is the common shortcut key function of Android Studio". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the common shortcut key function of Android Studio".

Android Studio is Google's Android development tool based on IntelliJ IDEA, similar to EcliPSe ADT,Android Studio which provides integrated Android development tools for development and debugging, and Gradle-based build support.

Common shortcut keys for Android Studio

Ctrl+D: a collection of copy and paste operations, if there is a selected part, copy the selected part, and after the selected part

Paste it out, and if there is no selected part, copy the line where the cursor is located and paste it at the bottom of the line.

Ctrl+ space: pressing this key combination when entering code will list the matching classes, method names, member variables, etc., and act as an intelligent prompt.

It is also useful in editing XML files.

Ctrl+ down arrow or Ctrl+ up arrow: this shortcut automatically closes the drop-down list when there is an auto-match drop-down list

Move the cursor to the next / previous line.

Switch the arrangement of the automatic matching drop-down list: there is a "π" icon in the lower right corner of the automatic matching drop-down list, which can be selected after clicking.

It is arranged in two ways: practicality and alphabet.

Ctrl+ slash, Ctrl+shift+ slash:

Ctrl+ slash: comment or uncomment the current line or selected code block, in the form of a double slash, that is, "/"

Ctrl+shift+ slash: comment or uncomment the selected code block, commenting in "/ … /" mode

Ctrl+shift+Enter: automatically matches corresponding grammatical structures, such as if,do-while,try-catch, etc.

Ctrl+F: searching for

Ctrl+ period: in the auto-match drop-down list, select the first item

Exclamation mark: in the auto-matching drop-down list, the up and down keys select an item that returns boolean, and pressing the exclamation point will automatically reverse it:

Ctrl+Enter: in the auto-match drop-down list, when no item is selected, the first item is selected by default.

Ctrl+shift+A: quickly find menus in android studio.

Ctrl+N: quickly find class names and files

Ctrl+B: jump directly to the place where classes, methods, and member variables are defined. The same effect as the left mouse button of Ctrl+

Ctrl+Alt+B: query which classes implement the interface where the cursor is located.

Ctrl+Alt+shift+I: detect code, such as variables or methods that are defined but not used. The purpose of detection is to improve code efficiency.

16.Ctrl+Alt+shift+N: a method or variable that quickly opens an input.

17.Ctrl+shift+F7: some related things are marked in the form of highlights, here are mainly three cases: 1. The cursor is positioned when implement

Will mark the method name of the class that implements the interface; 2. When the cursor is in return, it marks all exits of the method

3. A statement that generates an exception is marked when the cursor is over the try or throws keyword.

18. Shift + mouse scrolling: the horizontal scrolling of the editing interface can be realized.

19.Ctrl+Alt+V: this key combination can be used to reconstruct variables to simplify the complexity of the code when the parameters passed in when the method is called are more complex expressions.

Select the expression before you combine the keys.

Ctrl+D: compare two jar files. In the same project, select two jar files and press this key combination.

21.Ctrl+O: when a subclass wants to override the methods of the parent class, press this key combination to display the methods of all the parent classes. The key combination corresponding to the interface is Ctrl+I

22.Ctrl+shift+I: take a quick look at the method body. To see how a method is implemented, move the cursor over the method and press this key combination.

23.Ctrl+Q: move the cursor over the method and press this key combination to quickly view the documentation for the method.

24. Ctrl editing: switch the style of the editing interface, shortcut key design

25.Alt+shift+C: view the most recent changes to the project.

26.Ctrl+E: take a quick look at recently opened files.

27.shift+F6: classes, methods, and variables can be renamed, and names are automatically updated where they are used.

28.Alt+F1: quickly open project view, structure view, etc., to view the corresponding elements.

29.Ctrl+Alt+F7: view the use of a class, method, and member variable throughout the project.

30.Ctrlmatch shift + space: when assigning a value or passing parameters in a method, list the name of the method and member variable that match the type.

31.Ctrl+Alt+T: select a piece of code, press this key combination, you can quickly add if, for, try/catch and other statements.

32.Ctrl+Tab: open the interface switch window, hold down the Ctrl key, and select the appropriate window to open.

33.Ctrl+W: select the word where the cursor is located (a member variable or a method name), and press the statement that will be selected more than once

One more press will select the block of code. And so on, each addition expands the scope of the first-level selection.

Enter the import package of Alt+ and correct it automatically.

Ctrl+N lookup class

Ctrl+Shift+N lookup file

Ctrl+Alt+L format code

Ctrl+Alt+O optimizes imported classes and packages

Alt+Insert generates code (such as get,set methods, constructors, etc.)

Code recently changed by Ctrl+E or Alt+Shift+C

Ctrl+R replacement text

Ctrl+F find text

Ctrl+Shift+Space automatic completion code

Ctrl+ space code hint

Ctrl+Alt+Space class name or interface name prompt

Ctrl+P method parameter hint

Ctrl+Shift+Alt+N finds methods or variables in a class

Alt+Shift+C compares the recently modified code

Shift+F6 refactoring-renaming

Ctrl+Shift+ up the key first

Ctrl+X delete a row

Ctrl+D copy Lin

Ctrl+/ or Ctrl+Shift+/ comments (/ or /... /)

Ctrl+J automatic code

Recently opened files by Ctrl+E

Ctrl+H displays the class structure diagram

Ctrl+Q displays comment documents

Alt+F1 finds the location of the code

Alt+1 quickly opens or hides the project panel

Ctrl+Alt+ left/right returns to the location where it was last browsed

Alt+ left/right toggles code view

Alt+ Up/Down quickly moves and locates between methods

The Ctrl+Shift+Up/Down code moves up / down.

F2 or Shift+F2 highlight error or warning quick positioning

After the code label is entered, press Tab to generate the code.

Select the text, press Ctrl+Shift+F7, highlight all of the text, and press Esc to highlight and disappear.

Ctrl+W selects the code and pressing continuously will have other effects.

Select the text, press Alt+F3, find the same text one by one, and highlight it.

The Ctrl+Up/Down cursor jumps under the first or last line

Ctrl+B quickly opens a class or method at the cursor

Most commonly used shortcut keys

1.Ctrl+E, which can display a list of recently edited files

2.Shift+Click can close files

3.Ctrl + [or] can skip to the beginning and end of curly braces

4.Ctrl+Shift+Backspace can jump to the place where it was last edited

5.Ctrl+F12, which can display the structure of the current file

6.Ctrl+F7 can query the reference of the current element in the current file, and then press F3 to select

7.Ctrl+N, you can quickly open classes

8.Ctrl+Shift+N, you can quickly open files

9.Alt+Q can see the declaration of the current method

10.Ctrl+W can choose words, then statements, and then functions.

11.Alt+F1 can position the element you are editing in each panel

12.Ctrl+P, which can display parameter information

13.Ctrl+Shift+Insert can select the clipboard contents and insert

14.Alt+Insert can generate constructors / Getter/Setter, etc.

15.Ctrl+Alt+V can introduce variables. For example, assign the SQL in parentheses to a variable

16.Ctrl+Alt+T can wrap the code together, such as try/catch

17.Alt+Up and Alt+Down can move quickly between methods

Thank you for your reading, the above is "what is the common shortcut key function of Android Studio", after the study of this article, I believe you have a deeper understanding of what is the common shortcut key function of Android Studio, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report