我通过上面的Popupwindow写数据,然后显示在listView上,listView的数据源就是ArraysList<String>集合.我的listView是显示在碎片上面的.我在onDestoryView方法中保存数据到XML文件上,然后再onCreateView中提取数据
public Class FragmentMoive extends Fragment{
...
ArrayList<String> list;
SharedPreferences.Editor editor; //存数据
SharedPreferences pref; //取数据
onCreateView(LayoutInflater inflater,ViewGroup container,Bundle