Android Studio Code Snippets & Live Template

Skele·2024년 4월 10일
0

Android

목록 보기
4/15

How to make custom live template in Android Studio?

Go to Settings > Editor > Live Templates and create a new live template you want to add.

I've added a new live template that auto completes a comment which adds // CAUTION : to the code.

// CAUTION : onOpen is called when the database is 'opened', not on 'created'.
//           Database is opened when 'getReadableDatabase()' or 'getWritableDatabase()' is called.
//           It's not possible to gain reference of database here and use it on query or any SQL execution, because database does not open until that execution happens.
override fun onOpen(db: SQLiteDatabase) {
    super.onOpen(db)
}
profile
Tireless And Restless Debugging In Source : TARDIS

0개의 댓글