executePendingTransactions

executePendingTransactions

本文介绍了是否始终需要executePendingTransactions()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这更多是一个理论问题.

This is more of a theoretical question.

我遇到这样的情况,我的应用程序在调用 executePendingTransactions()进行片段交换时崩溃,并且没有它也可以正常工作.

I have a situation where my app crashes on a fragment swap with an executePendingTransactions() call and works fine without it.

我的问题是,如果我不致电 executePendingTransactions(),通常会出什么问题?

My question is what could go wrong in general if i don't call executePendingTransactions()?

据我了解,如果没有这种方法,尽管我从未经历过,但 Fragment 交换可能不会立即发生.

As i understand, without this method a Fragment swap may not happen immediately, although i have never experienced this.

推荐答案

除非您要执行依赖于事务的操作,否则不需要这样做.来自 API文档

It's not required unless you are executing something that depends on the transaction. From the API documentation,

这篇关于是否始终需要executePendingTransactions()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 19:38