Open In App

Different Ways to View Method Information in Android Studio

Easy access to documentation written in comments when hovered over the text is like a cherry on a cake. In Android Studio and other JetBrains editors, there is an option that you can enable to display function types and docs on mouse hover. But first, let’s get familiar with what methods are in Android Studio? According to the official site of Android developers, A Method provides information about, and access to, a single method on a class or interface. The reflected method may be a class method or an instance method (including an abstract method). A Method permits widening conversions to occur when matching the actual parameters to invoke with the underlying method’s formal parameters, but it throws an IllegalArgumentException if a narrowing conversion would occur. But what is the need for viewing method information in Android Studio? 

Why There is a Need to View Method Information in Android Studio?

The simple answer is, it makes the job much easier and helps the developers in making the app in a hassle-free manner. It will help you get to know more about the uses and implementation of methods. 



In this article, you will be shown how you can achieve the same by just following some simple steps. So in this article, we are going to discuss two different methods to View Method Information in Android Studio.

Method 1

Step 1: In Android Studio 4.0’s settings window, go to “Editor” > “General” and check “Show quick documentation on mouse move”. You can leave the delay at the default value.



In Android Studio 4.2, the option has moved to “Editor” > “General” > “Code Completion”. Check “Show the documentation popup”.

In the higher version of Android studio, You can go to “Editor” > “General” > “Code Editing”. Check “Show quick documentation on mouse move”.

This option moves a lot in android studio but most of the time you will find this option in one of the sub-options of EDITOR.

Method 2

auto.show.quick.doc=true

For macOS X users, you can just go to Android Studio > Preferences > Editor > General > Show quick documentation on mouse move. The shortcut for macOS x users is CTRL + F1 but the cursor should be on the method.

Article Tags :