Android overridePendingTransition仅显示动画的一半

时间:2013-11-15 21:05:46

标签: android animation android-pendingintent transitions

我查看了此问题的hereherehere的SO答案。那些提议的解决方案对我不起作用。我有一个测试应用程序,我的所有转换都可以工作,所以我对我的动画xml充满信心。这是我的意图:

static private void doBundleJump( Action loadPkgAction, Context context ) 
{
    LoadPackageAction loadPackageAction = (LoadPackageAction) loadPkgAction;
    Intent intent = new Intent(((Activity)context), BundleJumpActivity.class);
    BigBergSingleton single = BigBergSingleton.getSingleton();

    if( LoadDefaultPackageAction.class.isInstance(loadPackageAction)  ) 
    {
        loadPackageAction.setPackageId( single.getDefaultPackage() );
    }

    if(single.isHasAssets() == true)
    {
        intent.putExtra("packageName","");
        intent.putExtra("bundle", "bundle/"+ loadPackageAction.getPackageId());
    }
    else
    {
        intent.putExtra("packageName",single.getPackageName());
        intent.putExtra("bundle", loadPackageAction.getPackageId());
    }
    intent.putExtra("startPackage",single.getDefaultPackage());
    intent.putExtra("transitionType", loadPackageAction.transitionType);
    intent.putExtra("transitionDuration", loadPackageAction.transitionDuration);
    context.startActivity(intent);
}

我在create的目标(BundleJumpActivity)中调用了overridePendingIntent(int,int),但我也在上面的doBundleJump()方法中的startActivity(intent)之后调用了它。无论我尝试什么,我只得到入门动画。任何有关正确使用此工作的想法都将受到赞赏。

0 个答案:

没有答案