Kotlin:如何让 Android Studio 在类的底部实现接口的功能 [英] Kotlin: How can I let Android Studio implement interface's function at bottom of class

查看:45
本文介绍了Kotlin:如何让 Android Studio 在类的底部实现接口的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Kotlin 类中实现接口时:

When implementing an interface in a Kotlin class:

当我在 ClassName 上按 Alt+Enter 时,我可以让 IDE 通过实现成员"添加接口的功能.

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

在 Kotlin 中这些函数被添加在类的顶部有点烦人.我希望将它们添加到课程末尾(就像在 Java 中一样).

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).

我该怎么做?

推荐答案

现在无法控制方法的顺序.请观看相应问题,以便在实施时获得通知.

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.

这篇关于Kotlin:如何让 Android Studio 在类的底部实现接口的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆