Why doesn't android studio show type of object or variables

Viewed 6066

If I use Xcode or visual studio all I have to do is hover my mouse (Or alt + hover) to get more information about what the variable is returning or expecting. How can I do the same thing in android studio?

Do I have something toggled off or does android studio not support something like that?

3 Answers

One way I've found is simply placing the caret on the variable, and pressing F1. (Works with Flutter).

Alternatively, you can go to Settings->Editor->Code Editing and turn on Show quick documentation on mouse move.

In newer versions of android studio it is "Ctrl + Hover"

EDIT
On variable declaration line using "Ctrl + Hover" will show "Usages of variable".
On later usage of the variable it will show you its correct data type.

Related