In Android projects, especially cooperation projects,CodeStyle consistency is particularly important for coding. This article briefly describes how to import Google encoding style files in eclipse. For more information, refer to the official website: idea.
The first step, find the file (some nonsense) in the notebook (don't want to bother, you can also download through csdn: http://download.csdn.net/detail/aomandeshangxiao/5209114)
Run the checkout command.
Step 2: Import
Import method: eclipse-> window-> preferences-> JAVA-> code style-> formatter-> Import select the eclipse-java-google-style.xml file.
Click Apply. OK. In this way, you can select the code for formatting (the default shortcut key is Ctrl + Shift + F) to keep the code style consistent.
The default indent is 2 cells. Generally, it is a four-cell indent. You can modify it in edit:
Indentation and Tab indentation can be modified. This basically works.