Just turned into Android Studio and was not familiar with some of the operations in as, so record ...
Change the code hint shortcut in as, as do is also very smart, in Keymap can choose to use Eclipse shortcut key settings, but although set up, for some shortcut keys still can't use, then we need to manually modify.
In the code hint as the default shortcut key is Ctrl+alt+space, anyway I am not used to, or change to eclipse in the alt+/bar, modify must first copy a copy of the shortcut key set to modify:
At the time of modification, we will find that as prompt has a shortcut key conflict, meaning that this alt+/has been used, then we find that use alt+/shortcut key cancellation is, then how to see whether conflict? As an example:
In, I entered a line code comment shortcut key, and then in the box below the red font is a prompt for conflicting shortcut keys, how many pairs of curly braces [] There are many shortcut key conflicts, then how to see the conflict shortcut key?
Like the first line [Main menu | Code | Comment with Line Comment] This shortcut key conflict, it means that the main menu directory under the Code subdirectory under the Comment with the line Comment key conflict, and then find it to modify both.
Other shortcut keys like comment ctrl+/,ctrl+shift+/, find ctrl+f, view Source Press CTRL + LEFT mouse button, a key to modify the variable name shift+alt+r are unchanged. But when we create a javabean, we want to automatically generate getter and setter, toString (), or override the parent method, this time as the default shortcut key is Alt+insert, if you are not accustomed to this shortcut key, You can also modify the shift+alt+s used for Eclipse.
Finally, how to set the As automatic Guide package:
In the AS, we all know that a guide package is alt+enter, then how to a key guide package it? The answer is that there is no shortcut key to a key guide in as, and then there are auto-guided settings, such as: Explain what the above options mean:
Xml
- Show Import Popup, which is used for editing XML, automatically pops up an import dialog box asking if you need to import.
Java
- Insert Imports on paste:(all ask None), which is actually an option for you to ask for an imported package when you copy the code.
All : When you choose this item, you paste the code, you need to import the package name, will automatically import, do not play the prompt boxask: When you choose this item, you paste the code, there is a need to import the package name, will pop the prompt box, ask you want to importNone: When you choose this, the code you paste, the package name that you need to import, does not play the prompt box, and does not automatically import.
- Show Import Popup: This is different from the above insert imports on paste. Ha, don't mix, this means that when the declaration of the class you entered is not imported, a selection dialog box pops up. But this is a bit of a problem to note here. Whether you check or not, anyway, the dialog box will not pop out, after you lose the class name, the declaration is automatically imported. So I guess this could be a bug in Android studio.
- Optimize imports on fly: This is actually the same as the shortcut key Ctrl+shift+o/ctrl+alt+o, which is to remove the unused declarations.
- Add Unambiguous importson the fly: This is the automatic import function, when you enter the class name, the declaration is automatically imported.
- Exclude from Import and completion: This is actually your custom Import. You don't have to pay attention, generally you can't use it.
,
Android Studio Change shortcuts and auto-guided packages