Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

199
Vistas
How can I rearrange Kotlin code in the order?

First of all, I Google it, and find no answer to this. Also, I've found some questions here, but they dated 2016 and 2017. Now we have 2019.

I'm used to Java in Android Studio. When I override methods, IDE puts them in order - how they placed in parent class or implemented interface.

Also when I'm developing, for example, Repository pattern:

  • I create an interface.

  • Create classes which implements this interface

  • When I am adding functions in interface and then I override (ctrl+o, or alt+Enter on class name) them in my classes: In Java they placed at the same position as they defined in my interface, In Kotlin - the placed in top of the class (this is really bad!)

Also, code does not get reformatted automatically, for example: global vars placed on top, then goes constructors, etc.

So I'm asking.

It's just me? I've tried deleting all Android Studio settings, reinstalling, etc. It did nothing. Also, Googling did not take any results.

Is there any solution to all of this? Because I really liked kotlin, but this inconvenience is just very annoying.

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

Android Studio/IntelliJ official doesn’t have support for the Kotlin code rearrangement.

over 4 years ago · Santiago Trujillo Denunciar

0

Maybe this plugin Kotlin Code Sorter can fulfill your request. But this plugin only distinguishes the property, class, constructor or function. That the differences are inside some topics likes private, lateinit, val or var can not be order.

enter image description here

over 4 years ago · Santiago Trujillo Denunciar

0

First select that code which you want to rearrange or reformatted. Than Just press ctrl+alt+L for rearrange or reformatted code.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda