android-studio - 如何更改在 Kotlin 上生成的函数 TODO() 的主体?

标签 android-studio kotlin comments todo

我需要稍后在我的代码上留下一些事情要做,并且自动生成的 TODO() 会产生一个很长的注释,例如跟随

TODO("not implemented") //To change body of created functions use File | Settings | File Templates.

上面的行告诉我去File -> Setting -> File Template 去改变它,但是TODO() 函数不存在这个选项。如何解决?

最佳答案

进入 Android Studio 的 Preferences 窗口,选择 Editor -> File and Code Templates,打开 Code 选项卡,您将在其中找到 的选项可以自定义的新 Kotlin 函数体

关于android-studio - 如何更改在 Kotlin 上生成的函数 TODO() 的主体?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55834530/

相关文章:

android - 为什么 JavaScript 运行时包含在 Gradle for Android 中?

android - 将自定义标签添加到 Material 范围 slider

Android 房间错误 : TypeConverter not recognised for List of Enums

xcode - 无法评论选择

android - Viewpager 变得太高

android - 如何在Android Studio中找到gradle插件的所有可用属性和方法?

android - 使用 Gradle 组装时如何为单个 Android 构建产品 flavor 提供多种配置?

kotlin 中的 Spring 注入(inject)通用接口(interface)实现列表

vimrc 将注释设置为斜体

html - 如何隐藏或删除浏览器查看页面源代码中的评论?