首页 > 代码库 > fragment的通信之bundle

fragment的通信之bundle

fragment之间通信除了通过activity之外还可以通过bundle来实现

Bundle bundle = new Bundle();bundle.putString("key","value");MenuFragment menuFragment = new MenuFragment();menuFragment.setArguments(bundle);

 取数据时用

Bundle bundle = menuFragment.getArguments();

 

 

fragment的通信之bundle