Question

I read somewhere on either the Google or Android developer site that all new code needs to have this:

/*
 * Copyright (C) 2013 The Android Open Source Project 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at 
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */

At the top of every class in a project, and also these types of comments:

/** 
 * Implements listeners and call backs so that the location of user can be sought 
 */

In the code for ease of reference, but does anyone know where this is as I forgot to bookmark the page and now I cannot find that information anywhere, but I know I didn't dream it?

Thanks

Was it helpful?

Solution

Here's where you found that statement: http://source.android.com/source/code-style.html#use-javadoc-standard-comments

Note that this is only for when you contribute to Android's source code. They maintain the code base, so they get to enforce their own style guidelines. If you're just writing your own app, you can use any style you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top