Source: Jeremyhe
Links: http://zlv.me/posts/2015/07/13/14_android-studio-tips/
This is the part of the Philippe Breault series, "Android Studio Tips of the day" extracted from the essence of the self-thought.
These techniques can greatly improve work efficiency in practical applications.
About shortcut keys the File Structure Popup
ctrl+f12
This shortcut can bring up the outline of the current file and quickly jump to the specified method through fuzzy matching.
Check the "Show Anonymous classes" feature to be equivalent to Ctrl+o in eclipse
The call Hierarchy Popup
ctrl+alt+h
View the call path for a method.
Quick Definition Lookup
ctrl+shift+i
Quickly view the implementation of a method or class without leaving the current class of the current file. Many unknown pits can be avoided by probably previewing the cut-off method.
bookmarks!
such as its name, bookmark. Help to quickly return to the specified position, the actual use of the very cool.
f11
Adds the current location to the bookmark or removes it from the bookmark.
shift+f11
What bookmarks are displayed.
Find Actions
ctrl+shift+a
For menus or actions that do not have shortcut keys set or forgotten, they can be called quickly by typing their names. Divine Skill!!!
For example, if you want to compile, you only need to enter "release", then the "assemblerelease" option appears in the list box and the selection is ready to compile.
Move Lines Up/down
alt+shift+up/down
Move up and down the line, this nothing to say, will certainly use.
Lines Edit
ctrl+y
, ctrl+x
, ctrl+d
Delete rows, delete and copy rows, copy lines and paste, prerequisites.
VCS Operations Popup
' ALT + ' (is the key to the left of 1)
This shortcut displays a command that is commonly used by version management, and allows you to quickly select a command by using a number or a fuzzy match in front of the command.
Greatly improve the efficiency of the rapid submission of code, temporary code, cutting branches and other operations to the duck.
Hide All Panels
ctrl+shift+f12
Close or restore other windows. When writing code is very convenient full-screen editing box, you can more focus on the coding ...
Parameter Info
ctrl+p
When calling some methods, it is unavoidable to forget or not to know what parameters this method requires. ctrl+p
you can display the parameters required by this method. One of the necessary skills.
Rename
shift+f6
Rename the variable or method name. Reconstruct the divine skill.
Conditional breakpoint
By right-clicking a breakpoint, you can add a condition to a breakpoint. The breakpoint is entered only when the condition is met. Debugging divine skill, only to the situation of their own care to debug, not wasting time.
Enter debug mode
Tapping Attach Debugger
(the one next to the green bug) allows you to quickly get into debugging without having to redeploy and launch the app.
You can choose to set a shortcut key for this feature or call it by using the previously mentioned Find Actions(ctrl+shift+a)
input "attach".
Quickly view the value of a variable
Press and hold Alt
the variable or statement you want to view. If you want to see more, you can Alt+f8
enter your own custom statement by pressing the Bring- Evaluate Expression
up window.
Analyzing stack Information
Find Actions(ctrl+shift+a)
Enter "Analyze StackTrace" to view the stack information.
Analyze the origin of a value
Find Actions(ctrl+shift+a)
Enter "Analyze Data Flow to Here" and you can see how the value of one of the variables has been assigned a value.
is useful for parsing code.
Multi-line editing
One of the powerful deities, with Vim's vim-multiple-cursors or sublime text multi-line editor will never forget that thrill! It may not be the most commonly used skill, but it is a tool for improving efficiency at a critical moment.
Shortcut keys:Alt+J
Column editing
In Vim it is called block editing, and the same divine skill! How to use: Press and hold the Alt
left mouse button drop box to
PS: Found in Ubuntu is not available, in lieu of the method to press the Alt+Shift+Insert
drag box selection.
But after this operation, the divine skill is greatly reduced. It is estimated to be in conflict with Ubuntu shortcut keys.
Differences between enter and tab at Code hints
Look at the picture!
Multiple productivity-boosting Android Studio geek