Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading