I know from this answer that
If you want to immediately executing any such pending operations, you can call this function (only from the main thread) to do so.
But, if I call it from the static main thread, I get an error that says executePendingTransactions() is non-static and cannot be referenced from static context.
How do I fix this?
Thank you!
executePendingTransactions() is a regular non-static method on FragmentManager. You need an instance of FragmentManager, such as by calling getFragmentManager() (or getSupportFragmentManager() if you are using the fragments backport) on your Activity or Fragment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With