IllegalArgumentException in ActivityManagerProxy

后端 未结 3 1445
孤街浪徒
孤街浪徒 2020-12-20 14:57

Issue: ActivityA starts ActivityB with shared element transitions intermittently crashes Not consistently reproducible Api levels: 23, 24 and 25

3条回答
  •  时光取名叫无心
    2020-12-20 15:37

    I suppose, you should not use methods from support library for that versions. Sure, I can't figure out, from your existing issue due of random stacktrace.

    Since Tranlsation Scene introduced form 4.4. You can include api deprecation. Moreover, it's recommended, otherwise, why we need both types?

     if (Build.VERSION.SDK_INT >= 21) {
           ActivityOptions options = ActivityOptions
          .makeSceneTransitionAnimation(this, logoTransition, logoTextTransition);
           startActivity(this, intent, options.toBundle());
        } 
      else {
           ActivityOptionsCompat options = ActivityOptionsCompat
          .makeSceneTransitionAnimation(this, logoTransition, logoTextTransition);
           ActivityCompat.startActivity(this, intent, options.toBundle());
        }
    

提交回复
热议问题