如何在 Android Studio 中显示参数类型标签?

How to display arguments type label in Android Studio?

我希望 android 工作室在方法的参数旁边显示一个标签,例如 contextattachToRoot 如下图所示。

https://i.stack.imgur.com/2gWuU.png

如何在 Android studio 中启用此选项?

这是 Android Studio 3.0 的一项功能,默认启用。它仍处于测试阶段,但相当稳定。你可以try it now

设置和配置在那里

File -> Settings -> Editor -> General -> Appearance -> Show parameter name hints