Yas*_*ith 8 android android-transitions material-design shared-element-transition bottom-sheet
我有一个RecyclerView带有项目列表的片段。因此,当我单击某个项目时,BottomSheetDialog会打开一个。两种观点都有一些共同的观点。所以我想为此添加共享转换。我搜索 StackOverflow,但没有找到任何有关bottomsheetdialog.
所以我的问题是,是否可以将共享元素转换添加到BottomSheetDialog. 既然这是一个Fragment,应该有办法吧?有没有人有这方面的经验。?
我正在BottomSheetDialog像这样打开。
holder.cardAgenda.setOnClickListener(view -> {
AgendaBottomSheet bottomSheetFragment = AgendaBottomSheet.newInstance();
Bundle bundle = new Bundle();
bundle.putString("documentId", getSnapshots().getSnapshot(position).getId());
bundle.putString("name", model.getName());
bundle.putString("description", model.getDescription());
bundle.putString("date", dateFormat.format(timeStamp));
bundle.putString("location", model.getLocation());
bundle.putString("status", model.getStatus());
bottomSheetFragment.setArguments(bundle);
bottomSheetFragment.show(Objects.requireNonNull(getFragmentManager()), "Agenda Details");
});
Run Code Online (Sandbox Code Playgroud)
那么有没有一种方法可以像fragment中的方法一样设置共享转换addSharedElement()。
| 归档时间: |
|
| 查看次数: |
592 次 |
| 最近记录: |