I would like to know if there is some standard code styling for Android(maybe a book?) (styling XML , Java programming , file naming , etc...)
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
There is a ton of information available here: http://source.android.com/source/code-style.html
I was looking for something like that and found this. We are using it combined with some of our own conventions. Very helpful.
@inazaruk: The codesearch link for android-formatting.xml is now obsolete. I found the file at geobeagle.
Funny thing is that the file is also mentioned at android source (Using Eclipse) with no further linking :D (Most probably it was linking to the obsolete one).
One more file mentioned at android's Using Eclipse and found at geobeagle ;-) is android.importorder.
(This should be a comment but I don't have 50pt yet :/ Sorry)
Edit: March 2015
As Google Code is fading away you may find the two file at bitbucket.
please refer:
https://www.fer.unizg.hr/download/repository/ProjectConventions-_Java_Android.pdf
There is a good description of code style rules here.
If you want to enforce this rules without remembering all of them, and you are using eclipse then you can use formatting rules provided by Android team: android-formatting.xml. Just import it into eclipse using Preferences->Java->Code Style->Formatter, click Import.