Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.0 parameter hints information not always visible?

Sorry, I don't know how this new functionality is called exactly, please look at screenshot: enter image description here

So, parameter name is visible in method call. This is cool, but as you can see, only first parameter in this case, second has no name visible. From my observations, it sometimes works, sometimes it doesn't and I am unable to figure out why.

Can I configure it, or it's just a bug? Or maybe I'm not understand how that functionality is intended to work.

like image 885
user1209216 Avatar asked Nov 06 '17 11:11

user1209216


4 Answers

1.

Press Alt-Enter on your method and select doesn't show hints for the current method. Then you can see a dialog in the bottom right of the android studio. select Show Parameters Hint Setting, now you can customize this functionality. and finally, select undo in the dialog.

2.

File -> Setting -> Editor -> General -> Appearaance-> show parameters hint configure

like image 101
FarshidABZ Avatar answered Nov 16 '22 02:11

FarshidABZ


You can enable it by doing the following:

  1. Go to File > Settings > Editor > General > Appearance > Show parameter name hints
  2. Click Configure
  3. Language: -> Java
  4. Options -> Check Show hints even when type of expression is clear

As you can see below, it is visible for all parameters regardless of type:

parameter hind is visible for all parameters regardless of type

EDIT

It looks like this setting was removed in Android Studio 4.0

There are however new Inlay Hints options:

  1. Go to File > Settings > Editor > Inlay Hints > Java > Parameter hints
  2. Check Show parameter hints for:

enter image description here

like image 24
Pierre Avatar answered Nov 16 '22 02:11

Pierre


In 2020

For Webstorm & PhpStorm

If variable calling not shows the parameter hints, you can enable it by going to

File => Setting => Editor => Inlay Hints => (preferred language) => parameter hints => For non-literal arguments

like image 2
Nisharg Shah Avatar answered Nov 16 '22 01:11

Nisharg Shah


In Android Studio 4.1.3

File - settings - Editor - inlay hints - Kotlin (or java) - choose "types" then mark (or unmark) the box that says "show hints for" then mark (or unmark) your choices

How its made in Android Studio 4.1.3

like image 1
MarkT Avatar answered Nov 16 '22 03:11

MarkT