Kotlin: How can I let Android Studio implement int

2019-04-06 03:27发布

When implementing an interface in a Kotlin class:

When I press Alt+Enter on ClassName I can have the IDE add an interface's functions via 'implement members'.

It's kind of annoying that in Kotlin these functions are added at the top of the class. I would like them to be added at the end of the class (just like in Java).

How can I do that?

2条回答
萌系小妹纸
2楼-- · 2019-04-06 03:44

On Android Studio 3.2: You can specify the desired location using the pointer, and use CTRL+I keymap. Then you need to choose the necessary methods, and Studio place them into your point position.

查看更多
Explosion°爆炸
3楼-- · 2019-04-06 03:56

Right now there is no possibility to control the order of the methods. Please watch the corresponding issue to get notified when this is implemented.

查看更多
登录 后发表回答