@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (getUserVisibleHint()) {
isVisible = true;
onVisible();
} else {
isVisible = false;
onInVisible();
}
}
Run Code Online (Sandbox Code Playgroud)
我发现这部分代码没有执行。
@Query("update bookmarks set bookmarks_path= replace(bookmarks_path,:oldPath,:newPath) where bookmarks_path like :oldPath || '%'")
fun updateBookmarksPath(oldPath: String, newPath: String): Completable
Run Code Online (Sandbox Code Playgroud)
我正在使用房间数据库,这是我的代码
运行时发现这段代码的格式不正确,android studio提示我:Expression Expected, Got 'replace'
像这样
我想要达到这样的效果
----路径------------------路径
/根/1/1--------------/堆栈/1/1
/根/名称/1------/堆栈/名称/1
/root/cls/1------------/stack/cls/1
/root/go/1------------/stack/go/1
/根/js/1------------/stack/js/1
请