Common shortcuts for Android Studio

1. Prompt and generate code
Ctrl+Alt+Space: code prompt
Ctrl+p: prompt parameter
Ctrl+J: shortcut code prompt
Ctrl+Alt+T: add if, for, try/catch and other statements to the selected code
Alt+Insert: Pop up the automatically generated code dialog
Ctrl+O: pop up the rewritable method dialog in the class
2. Compile the code
Ctrl+Shift+Up/Down to move the current code
Ctrl+D to copy the current code to the next line
ctrl+W to select the code, press continuously There will be different selection effects
Ctrl+Alt+L code formatting
3. Replace and search
Ctrl+F: find
Ctrl+R: replace
4. View code
Ctrl+N: enter the class name, quickly open a specified class
Ctrl+H : View Fu Lei's hierarchy
Ctrl+U: View the parent class of the current class
Ctrl+Alt+Left/Right: The cursor returns to the position where it last stayed
Alt+Up/Down: The cursor quickly moves between class methods
Ctrl+ "+": The cursor is located Method expand
Ctrl+ "-": the method where the cursor is located, collapse and collapse
Ctrl+ +Shift+ “+”: expand all methods of the current class
Ctrl+ +Shift+ “-”: collapse all methods of the current class
Ctrl+ +Shift+ [or]: Select all the codes between the braces
Ctrl+Alt+H: View where a method is called

Guess you like

Origin blog.csdn.net/weixin_43244265/article/details/107476468