If you want to write comments for your android functions, there is an easy way to auto generate the basic comment skeleton in Android Studio.

First define you function with all the necessary parameters and a return value. Then keep the cursor above the function, type /** and press Enter key. You can see the required will be generate above your function.

1. Define your function.

private boolean shouldGenerateAutoComments(String title, boolean isValid, List<String> listNames){
        // function code
        return true;
}

2. Place the cursor above the function, type /** and press Enter.

/**
     * 
     * @param title
     * @param isValid
     * @param listNames
     * @return
     */
    private boolean shouldGenerateAutoComments(String title, boolean isValid, List<String> listNames){
        // function code
        return true;
    }
Author

Ravi is hardcore Android programmer and Android programming has been his passion since he compiled his first hello-world program. Solving real problems of Android developers through tutorials has always been interesting part for him.

  • aS

    qeqwewqewqe

  • sakda

    Thank a lot, guys

  • Anu Anupriya

    Thankuuuu….

  • Hossein Kurd

    Thanks Dude