Original address: http://www.developerphil.com/android-studio-tips-of-the-day-roundup-1/
1. Highlight the same string
Apple: Cmd+shift+f7 Windows:ctrl+shift+f7
This shortcut will search the current file for all occurrences of the string. Unlike some simple pattern matching, this shortcut can sense the current scope and only highlight related strings. You can then use the menu Edit->find->find next/previous to move through the matches.
More tips:
(1) When the "return" or "throw" statement is highlighted, the other exit points of the method are also highlighted.
(2) When highlighting the "extends" or "implements" keywords in the definition section of a class, the methods that are overridden or implemented in the class are highlighted.
(3) When the import statement is highlighted, the location used by the importing package is highlighted.
(4) Press the ESC key to exit the highlight state.
2. Move the cursor between the class method and the inner class
Apple: Ctrl + up/down Windows:alt+up/down
This shortcut allows you to move quickly between adjacent methods or internal class names. If the cursor is currently inside the method body, the cursor will be moved to the method name, which is useful if you just want to refactor the method or find out where the method is called.
(Note: This shortcut in My computer and other functions of conflict, need to reconfigure their own shortcut mapping relationship)
3. Popup File Structure dialog box
Apple: Cmd+f12 windows:ctrl+f12
The function of this shortcut is to pop up a dialog box to display the structure of the current class and navigate inside the class to jump. If you want to search for a method and know the name of the method, then using this shortcut will be super simple. Because you can filter the method name directly with the keyword.
More tips:
(1) The hump abbreviation can be used to match the candidate list, such as: Input "OCr" will match "OnCreate".
(2) By selecting the check box at the top of the dialog box, you can implement real-time retrieval filtering for anonymous inner classes and inherited members.
4. Call Hierarchy dialog box
Apple: Ctrl+alt+h windows:ctrl+alt+h
This shortcut shows the possible invocation hierarchy based on the declaration of the method and the invocation relationship within the method.
(Note: The cursor will be placed on the method name and then press the shortcut key to produce an effect)
5. Definition of Quick Find method
Apple: Alt+space windows:ctrl+shift+i (capital I)
Ever thought about not leaving the current editing context and simply looking at the specific implementation of a particular method or class? This shortcut will do the job very well.
6. Stretching or shrinking the code
Apple: Alt + plus/minus Windows:ctrl+shift+plus/minus
This feature allows developers to temporarily block out what they don't care about and focus on the more important part. In the simplest case, the feature can hide the entire block of code directly (such as the Import list). One of the most interesting applications is the shrinkage of the anonymous inner class, which is as concise as the lambda expression.
More tips:
(1) You can also set the default contraction stretch behavior in editor->code folding.
7. Play Bookmarks
Apple: F3 windows:f11
8. Show Bookmark List
Apple: Cmd+f3 windows:shift+f11
9. Find Execution action
Apple: Cmd+shift+a windows:ctrl+shift+a
This shortcut allows the developer to quickly execute all the actions in the menu by manipulating the name. It is a useful feature for some commands that do not have a corresponding shortcut key.
More tips:
(1) If the action is associated with a shortcut key, it will be displayed to the right of the list item.
10. Move the entire line up or down
Apple: Alt+shift+up/down Windows:alt+shift+up/down
Not explained.
11. Delete whole Line
Apple: Cmd+backspace windows:ctrl+y
Not explained.
Android Studio Shortcut key daily (1)