6

I've been working in Android Studio recently, and was wondering if there is a hot key / setting / method for autofilling function parameters after a function call is autocompleted.

For instance, if I type in db.query(), I would like the following to show upon the auto-completion of query:

db.query(table, columns, selection, selectionArgs, groupBy, having, orderBy);

instead of just the function name with empty (but required) parameters:

db.query();
CodyF
  • 4,977
  • 3
  • 26
  • 38
  • 2
    Coming from Xcode I would definitely expect that. A small help: Ctrl-P (Win) / CMD-P (Mac) will show parameters (but no autocompletion) -> https://developer.android.com/sdk/installing/studio-tips.html – Wirsing Sep 23 '14 at 23:53

2 Answers2

3

Android Studio does not really provide auto completing your functions but you can show the parameters of the function in the other class by pressing Crtl + P. This opens a pop up with the names of the variables.

This may help

Community
  • 1
  • 1
orange01
  • 1,584
  • 1
  • 16
  • 28
1

If you are using Kotlin, there is a plugin called Kotlin Fill Class. After writing the parentheses, right click into it and select Show Context Actions (Shortcut Alt + Enter, in my case) and then Fill function with dummy values.

enter image description here