【问题标题】:Gmail App - Lollipop Shared Elements transitionsGmail 应用程序 - Lollipop Shared Elements 转换
【发布时间】:2015-04-27 11:02:33
【问题描述】:

我知道这个问题被问了很多次,但我仍然无法找到解决方案。

我们都知道 Lollipop Shared Elements 过渡仅适用于棒棒糖设备,但最近对 Gmail 应用程序的更新在棒棒糖之前具有相同的动画效果(我猜是从 4.​​1 开始)。

Yplan 应用也有同样的效果。

如何做到这一点?我猜他们正在使用共享元素转换

【问题讨论】:

  • 官方API没有为Lollipop以下的设备提供任何自动“共享元素转换”API。 Gmail 和其他应用程序可能会使用here 描述的方法来实现类似的效果。

标签: android android-5.0-lollipop android-transitions shared-element-transition


【解决方案1】:

你没有在棒棒糖下面获得官方的“共享元素转换”API,所以你唯一能做的就是手动实现它。

  1. 您也可以使用这个open source library
  2. 这是第二个开源库which works for 2.2+

【讨论】:

    【解决方案2】:

    您可以查看此库,了解棒棒糖前设备的活动和片段转换

    dependencies {
        compile 'com.albinmathew:PreLollipopTransition:1.1.2'}
    

    https://github.com/albinmathew/PreLollipopTransition

    【讨论】:

    • 谢谢你会检查:)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-28
    • 1970-01-01
    • 2014-02-13
    相关资源
    最近更新 更多