简单的方法就是用ListFragment。不然就是用普通的fragment,在onCreateView方法中返回的View里面包含一个ListView。如果你是要异步获取adapter中的数据,而且是ListView是由fragment加载的,那么当然是写在fragment里面了,这样你在其他activity中加载这个fragment时,就不用改fragment了。
写在fragment里
不是有个ListFragment吗