Search code examples
javaandroidxmlnaming-conventionsandroid-gui

Best practices and conventions in Android XML and .java files


I am java programmer and I try to follow coding conventions and best practices. But these days I am learning Android,but some times its very confusing giving name to component/s in XMl and using them into java files.Because we also need to hold XMl component in java so we also need to declared variables name in java.So most of the time I got confused which one is from XMl and which one from java.Also if there multiple XML GUI file it also make confusion which component belongs to which XML files.

So could some please share or tell how can I make things better to understand,so I do not need to switch from one file to another files to see which id belongs to which file.

Thanks


Solution

  • I am also a beginner at Android and Xamarin.Android and the link below helped me much with the naming conventions of java and xml stuff.

    https://github.com/ribot/android-guidelines/blob/master/project_and_code_guidelines.md

    Hope this will help you.