2017-08-04 112 views
3

Android Studio 3.0中顯示了由Kotlin修改的以下示例代碼,我發現fun detailIntent.putExtra("Person", SampleData.BOB)顯示爲detailIntent.putExtra(name: "Person", SampleData.BOB),並且我無法在編輯器中刪除nameAndroid Studio 3.0是否添加參數提示信息?

看來,Android Studio 3.0添加參數提示信息的名稱吧?以及如何設置打開或關閉它?

enter image description here

回答

6

It seems that Android Studio 3.0 add parameter prompt information name - 是的。

and how can I set to turn on or turn off it?

禁用,只是在提示的地方點擊右鍵 -

enter image description here

啓用,以同樣的方式: -

enter image description here

如果您遇到點擊問題,請將其從設置中更改: -

enter image description here

+0

謝謝!我可以禁用,但我找不到項目啓用參數名稱提示,你會看到圖像https://www.dropbox.com/s/ev9crcg2sqgutw6/bb.PNG?dl=0 – HelloCW

+0

@HelloCW,因爲你的光標在錯誤的地方,你的光標應該在字或參數分隔符之前或之後「,」 – Ibrahim

+0

謝謝!你是對的!但是,當我在光標SampleData.BOB之前或之後定位光標時,啓用參數名稱提示項不顯示,爲什麼? – HelloCW