javascript - React-Native 中的 SharedElement 转换
问题描述
当我尝试在两个屏幕之间转换时遇到问题。我期待类似的例子,但我得到了非常不同的东西。所以我创建了简单的设计来测试它,但我不知道如何才能获得最终结果?我会上传视频。所以我只在我的主页和图像所在的详细信息页面中添加了两件事。
这是我主页中的 ShareELement
<SharedElement id="iamge">
<Image
source={images.bannerBg}
resizeMode="cover"
style={{
width: "100%",
height: "100%",
borderRadius: 20,
}
/>
</SharedElement>
这是我的详细信息页面中的 ShareELement
<SharedElement id={"image"}>
<Image
source={images.bannerBg}
resizeMode="cover"
style={{
width: "100%",
height: "100%",
}}
/>
</SharedElement>
我也在我的详细信息页面中添加了这个
PlantDetail.sharedElements = (route, otherRoute, showing) => [
{ id: "image", animation: "fade-in" },
];
所以我的最终结果是
期望像
对不起,我的英语不好!
解决方案
推荐阅读
- c++ - 致命错误:avr/io.h:没有这样的文件或目录
- python-3.x - 使用两对键创建字典/列表:具有迭代形式的值/项
- google-chrome - 如何定义将从本地存储(Chrome 扩展)中检索的变量?
- python - 列表中的Python求和值,如果它存在于另一个列表中
- spring-boot - Spring websocket消息代理添加额外的Access-Control-Allow-Origin标头来响应
- jquery - 选择选项未更新
- reactjs - 从状态更新多选选项不会触发 material_select 因此选项不会出现
- oauth-2.0 - 我应该将身份验证代码移动到访问令牌交换到 API 以实现 Web API/SPA OpenID Connect 吗?
- codeigniter - 无法链接到 codeigniter 中另一个页面上的锚点
- maven - Maven原型包构建