Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我ListView在AsyncTask里面创作Fragment。在onActivityCreated方法中我调用AsyncTask's execute()方法,但是onPause()当我恢复活动之后,我的列表是空的。我应该再次调用execute()方法onResume()吗?谢谢你。
ListView
AsyncTask
Fragment
onActivityCreated
AsyncTask's execute()
onPause()
execute()
onResume()
是的,您必须调用 execute on onResume()。有关活动周期的更多信息,请参见此处。