Using IntelliJ this time, has been looking for some skills, and constantly improve its proficiency. Let's tell you a little secret and take a look at the thrill of IntelliJ's semi-automatic format code. To use this feature you also have to install a plug-in--eclipse Code Formatter, which can be installed online from the IntelliJ warehouse, but this speed is really not flattering, so here is a network disk.
* Eclipse Code formatter Download:Http://pan.baidu.com/s/1dD8NCBJ
① Installing the Eclipse Code Formatter plugin:
Install the words, do not want more nonsense, simply mention.
File->settings->plugins->install plugin from disk
② enable eclipse Code Formatter
File->settings->other tools->eclipse Code formatter->use the Eclipse code Formatter
Two x Browser keys select a previous Eclipse workspace project directory. Settings/org.eclipse.jdt.core.prefs, OK, or the last picture.
Here you can format the Java code toformatting XML has to go on.Look down.
③ Next is relatively simple, point two is OK.
Settings->editor->code Style->xml
Switch to the Arrangement tab and click on the rightmost small Set from ... Such as
④ Direct OK to complete.
⑤ back to the editor to open a layout file, write the code to try, after writing the first time to remember to use the shortcut key ctrl+alt+shift+l, call out the reformat action option, such as tick, again format the XML, the label's properties will be reflow.
OK, here we are, tired ...
* Refer to the official blog:
http://blog.jetbrains.com/idea/2013/10/rearrange-attributes-in-android-xml-files-with-intellij-idea-13/
IntelliJ formatting of Java and XML