0

Please advise, I have a problem in Android Studio version Meerkat where, for example, when I type Image and press Tab, it only generates Image(). However, I’ve seen that it’s possible to set it up so that when I start typing Image and press Tab or click on one of the suggested methods, it generates Image(painter =, contentDescription =).

I tried enabling "Show parameter name hints on completion." but it's not working

1 Answer 1

0

Android Studio doesn’t insert parameter names by default on completion. To achieve this behavior:

Live Template workaround:

    • Go to Preferences > Editor > Live Templates

    • Create a Kotlin template like: Image(painter = $PAINTER$, contentDescription = $DESC$)

    • Assign a shortcut, e.g., img, and expand with Tab

  1. Alt + Enter hint:

    • After inserting Image(), place the cursor inside parentheses

    • Press Alt + Enter → Select "Add names to call arguments"

  2. Try the Kotlin Fill Class plugin for automatic named parameter filling.

As of Meerkat, “Show parameter name hints on completion” only affects inline hints, not autocomplete inserts.

Sign up to request clarification or add additional context in comments.

1 Comment

Please note that the proposed workaround only works for this once, specific function. You would need to create separate templates for each and every function where you want this to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.