Why ".kt" extension is sometimes visible and sometimes not?
This could happen if activity does not meet one or more of these points:
- 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).
- There are no top-level declarations (constants, variables).
If a kotlin file has exactly one outer class/object/interface
as the name of the file, then Android studio just shows the name without extension.