Why ".kt" extension is sometimes visible and sometimes not?


In on of my Android Studio Kotlin projects, sometimes .KT is shown and sometimes not, in the Project explorer, in the Activity folder.

What is the criteria used by Android Studio to show or hide the .KT extension ?



Solution :

One activity file should contain only one class.

One activity file class name declaration must correspond to the good filename (filename must equals class name).

Answered By – KotlinIsland

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published