我有2个片段:(1)Frag1(2)Frag2
I have 2 fragments: (1)Frag1 (2)Frag2.
bundl = new Bundle();
bundl.putStringArrayList("elist", eList);
Frag2 dv = new Frag2();
dv.setArguments(bundl);
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.the_fragg,dv);
ft.show(getFragmentManager().findFragmentById(R.id.the_fragg));
ft.addToBackStack(null);
ft.commit();
在Frag2
我如何得到这些数据?
How do I get this data in Frag2?
您属于分片类的方法称为getArguments()......
you have a method called getArguments() that belongs to Fragment class....
上一篇:安卓:ClassCastException异常增加一个头,以ExpandableListView时个头、异常、ClassCastException、ExpandableListView
下一篇:内容提供商INSTALL_FAILED_CONFLICTING_PROVIDER(安装内容提供商作为一个单独的APK)提供商、内容、作为一个、INSTALL_FAILED_CONFLICTING_PR