在IntelliJ IDEA的/ Android的工作室的Android code风格 [英] Android Code Style in Intellij Idea / Android Studio
问题描述
Android的工作室之前,我是用<一个href="https://raw.github.com/android/platform_development/master/ide/eclipse/android-formatting.xml">android-formatting.xml如在Eclipse code风格。
Before Android Studio, I was using android-formatting.xml as Code Style in Eclipse.
如何安装Android的工作室/ IntelliJ IDEA的格式化code为在Eclipse?
How can I setup Android Studio / Intellij Idea to format code as in Eclipse?
更新
我试过的Eclipse code格式化插件。它似乎工作,但不能编辑任何设置的。我的团队prefers 120列,而不是100。
I tried Eclipse Code Formatter plugin. It seems to work, but you cannot edit any setting at all. My team prefers 120 columns instead of 100.
我想@CrossleSong回答了。这是一个有点棘手,但功能更强大。您可以保存此
I tried @CrossleSong answer too. It's a bit tricky, but more powerful. You can save this
<一个href="https://android.googlesource.com/platform/development/+/android-4.2.2_r1.2/ide/intellij/$c$cstyles/AndroidStyle.xml">https://android.googlesource.com/platform/development/+/android-4.2.2_r1.2/ide/intellij/$c$cstyles/AndroidStyle.xml
为 Android.xml 的,并把它复制到AndroidStudio /的IntelliJ codestyles文件夹:对我来说是
as Android.xml and copy it to AndroidStudio/Intellij codestyles folder: for me is
〜/库/ preferences / AndroidStudio preVIEW / codestyles
现在,您可以选择Android作为在Android的工作室preferences code风格。
Now you can select Android as Code Style in Android Studio Preferences.
推荐答案
您可以从Android源研究与开发。它的文件夹中的开发/ IDE /的IntelliJ ,它包括code风格,模板...
You can download developement from android source. It's folder development/ide/intellij, It' include code style, template ...
这篇关于在IntelliJ IDEA的/ Android的工作室的Android code风格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!