问题 – A>ActivityOptionsCompat.makeSceneTransitionAnimation>B>onBackPressed()
出错.
从Stackoverflow上得到的答案是:
The Fade transition will use hardware layers when your view does has “hasOverlappingRendering()” return true. This was done for performance. You must have many views all fading out separately.
You have a couple options. One is for your views to have hasOverlappingRendering return false. This may not be possible in all cases, but it may be enough to solve your problem. Remember that this means that the contained views should not overlap!
The second is to transition fewer views separately. You can do this by setting android:transitionGroup="true"
on ViewGroups that should be faded out together. For example, if you have a ListView with no background, you’ll end up transitioning each element separately. Instead, you can set the ListView’s transitionGroup property to true and then they’ll transition together.解决了.