Some common shortcuts and shortcut keys for Android Studio conflict resolution

Source: Internet
Author: User

1. Recently in self-study Android, is also reading while writing some demo, because of more and more knowledge points, the brain is more and more memory is not clear, so intends to write reading notes, for later review, but also to learn what they understand to write out, caught dead, if there is a wrong place, I hope everyone give and correct.

2. Because similar to reading notes, may format God horse will compare with (hen) meaning (chou), we can't stand, you can hard spit groove.

I'm just dividing the line ***************************************

About Android Studio shortcut keys, I am here based on the default mode record, Android Studio supports multiple modes of shortcut keys, modify the method: File--->settings-->keymap---> Right drop-down box, you can choose the mode that suits you; I used visual Studio, Eclipse, to try out the shortcuts for the two modes of Android Studio before developing the tool, and found that the shortcut keys for the other two development tools were still a little different. So we re-learned the shortcut keys in the default mode of Android studio and made a record here.

Shortcut keys function " more commonly used marked out "
Ctrl + N

Find classes,

Click will pop up a small window to find the name of the class, quickly locate their own written classes;

Ctrl + Shift + N

Find the file for the current project,

Click will pop up a small window to find the filename, quickly locate the file location;

1. Ctrl + F

2. Ctrl + F3

3. F3

Finds the string for the current file,

The first click will pop up a small window, the second is to quickly find the current cursor location of the string, the third is the first second shortcut, when you use the first or second way to find, directly click the F3 key, you can search;

Ctrl + {or} (opening parenthesis or closing parenthesis)

Jump to the beginning or end of a method or class

Ctrl + J

Quickly add loops, if judgments, try/catch, etc.

Alt + Insert

Quickly generate constructors, get, set methods, and so on

Ctrl + Shift +↑ or ↓

Advance or reverse the current scope code by one line

Ctrl + D

Copy when moving forward

F2 or Shift + F2 Show warnings or errors, quickly locate errors or errors
F4 or Ctrl + B Open definitions for classes, methods, variables, and so on
Ctrl +-or + (minus or plus)

Collapse or expand the method where the current cursor is located, etc.

In the code and XML file effect is not quite the same, experience;

Ctrl + Shift +-or + (minus or plus)

Collapse or expand all methods of the current file, etc.

In the code and XML file effect is not quite the same, experience;

Ctrl + P

The parameter type of the prompt method,

Move the cursor to the method name or in parentheses behind the method, and then click to prompt you for the method's parameter type;

1. Ctrl + Space

2. Ctrl + Shift + Space

Code Intelligence Tips,

This and the last Ctrl + P shortcut is a bit similar, but not the same, these several people use the process of experience, these three are more commonly used;

Ctrl + Q

Interpretation of methods, properties, variables, classes, etc.,

After clicking, a small window will pop up with some explanations of this method or property;

Shift + F6

Renaming

Modify the names of classes, methods, properties, variables, etc.;

Ctrl +/(slash)

Note the current code,

Note The code for the current row or the selected row, as well as for the Androidmanifest.xml and layout XML files for the project.

Ctrl + Shift +/(slash)

Add a comment for the zone block, <!--<uses-configuration android:reqnavigation= "Trackball"/> A comment such as this, after the line that needs comment is selected, Click to comment out the currently selected line, if not selected, after clicking, you can automatically generate a <!---->

Ctrl + Alt + L

Formatting the current Code

Ctrl + F12

View the structure of the current file,

For example, in a Activity.java file, when clicked, a small window pops up, showing all the methods, variables, inner classes, and so on, and where you can choose to navigate.

Alt +↑ or ↓

At the current. Inter-method jumps in Java files

Alt +← or →

Quickly switch between open tab pages

Ctrl + Alt +← or → Go back or jump forward to the location where the cursor is located
Alt + F7

Find methods, properties, and other referenced places

"Conflict resolution" smart prompt shortcut keys CTRL + Space, on some computers, will and the system switch keyboard shortcut keys conflict , resulting in the inability to respond, my personal approach is to put the Android This shortcut in studio is changed to the previous shortcut in Eclipse ALT +/(slash), detailed operation:

File--->settings-->keymap, and then search completion, you can find this shortcut, if you change to ALT +/(slash), and another shortcut key conflict, it is suggested that another ALT +/(slash) can be canceled.

Here, the shortcut key is finished, in fact, not only so little, I just listed some of their usual use, with the advantage of shortcut keys is, in the process of writing code, to a large extent, out of the mouse, improve efficiency, by the way can be installed a beep, haha.

Some common shortcuts and shortcut keys for Android Studio conflict resolution

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.