55 /**
56 * 无状态的 会全部加载着, 这个适合少量的 特别多的图片啊啥的 还是用
FragmentStatePagerAdapter
57 * @author lilei
58 */
59 // public static class MyAdapter extends FragmentPagerAdapter {
60 // public MyAdapter(FragmentManager fm ) {
61 // super(fm);
62 //
63 // }
64 //
65 // @Override
66 // public int getCount() {
67 // return NUM_ITEMS;
68 // }
69 //
70 // @Override
71 // public Fragment getItem(int position) {
72 // // 返回相应的 fragment
73 // return ArrayFragment.newInstance(position);
74 // }
75 //
76 // @Override
77 // public void destroyItem(ViewGroup container, int position, Object object) {
78 // System.out.println( "position Destory" + position);
79 // super.destroyItem(container, position, object);
80 // }
81 // }
82
83
84 /**
85 * 所有的 每个 Fragment
86 */
87 public static class ArrayFragment extends Fragment {
88
89 int mNum;
90 static ArrayFragment newInstance(int num) {
91 ArrayFragment array= new ArrayFragment();
92 Bundle args = new Bundle();
93 args.putInt("num", num);
94 array.setArguments(args);
95 return array;
96 }
97