user18365424
user18365424

Reputation:

Why does Android Studio show import... vs. the actual import statements

I am new to Android development.

At various times I have noticed that the top of a Kotlin file shows import... and I have to click it each time to display the actual import directives.

What is that behavior? Why do the import directives not just display each time I open the file?

Upvotes: 1

Views: 136

Answers (1)

ekalin
ekalin

Reputation: 1012

They're collapsed to reduce clutter so you can focus on the code itself. Most of the time there's no need to deal with the imports directly.

You can change this behavior in Settings -> Editor -> General -> Code folding. Disable "Imports" in the "General" section.

Upvotes: 2

Related Questions