Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kotlin file to kotlin class

I created a kotlin file instead kotlin class, but my file is a class truly and the icon continue as follow

enter image description here

I would like if the icon was as follows (just why I feel comfortable so)

enter image description here

Thanks for any suggestions on how to solve it

like image 340
Abner Escócio Avatar asked Dec 23 '22 06:12

Abner Escócio


1 Answers

Create a class in that file with the same name of the file:

If the file is MyClass.kt

add to the file

class MyClass{

}

If the file only contains the class it will have the second icon. If you add anything else to that file it will change back to the first icon.

like image 80
Levi Moreira Avatar answered Jan 08 '23 05:01

Levi Moreira