我正在关注Android 开发者网站上的教程。它在 Java 示例中使用 Kotlin。我在堆栈溢出上找到了这篇关于等效内容的文章,但我不明白答案。
原来的代码是:
// Defines the selection clause
private static final String SELECTION = Data.LOOKUP_KEY + " = ?";
// Defines the array to hold the search criteria
private String[] selectionArgs = { "" };
/*
* Defines a variable to contain the selection value. Once you
* have the Cursor from the Contacts table, and you've selected
* the desired row, move the row's LOOKUP_KEY value into this
* variable.
*/
private …Run Code Online (Sandbox Code Playgroud)