我在一个片段里面使用childFragmentManager
或在一个Activity 里面显示一个对话框supportFragmentManager
,在这个过程中我想设置目标片段,如下所示:
val textSearchDialog = TextSearchDialogFragment.newInstance()
textSearchDialog.setTargetFragment(PlaceSearchFragment@this, 0)
Run Code Online (Sandbox Code Playgroud)
但是当运行该代码时,我得到错误:
java.lang.IllegalStateException:Fragment TextSearchDialogFragment {b7fce67#0 0}声明的目标片段PlaceSearchFragment {f87414#0 id = 0x7f080078}不属于此FragmentManager!
我不知道如何访问FragmentManager
导航组件正在使用来管理片段的显示,有没有解决方案呢?
android kotlin android-navigation android-architecture-components android-architecture-navigation
我尝试使用 zsh 而不是 bash 与 docker exec 命令一起使用,如下所示:
docker exec -it d52b251308b3 zsh
Run Code Online (Sandbox Code Playgroud)
或这个:
docker exec -it d52b251308b3 /bin/zsh
Run Code Online (Sandbox Code Playgroud)
位置是正确的,但我收到此错误:
rpc 错误:code = 2 desc = oci 运行时错误:exec 失败:container_linux.go:247: 启动容器进程导致“exec: \"zsh\": 在 $PATH 中找不到可执行文件”
我正在使用 Google Cloud Vision API 来检测给定图像中的地标、网络实体和其他内容(请查看此处的文档),我专门使用 images:annotate 端点,并且我想指定语言,我想要返回结果为英文。
我有办法实现这一目标吗?
android ×2
android-architecture-components ×1
android-architecture-navigation ×1
docker ×1
dockerfile ×1
kotlin ×1