Fragment之间传值

 

Activity:

     String myArguments;    public String getarguments() {   return myArguments;  }

    public void setarguments(String title) {   this.myArguments = title;  }     

 

http://www.cnblogs.com/xiaobo-Linux/ qq463431476

Afragment:

 

((MainActivity)getActivity()).setarguments("p");

 

Bfragment:

 String home = ((MainActivity)getActivity()).getarguments();

 

posted @ 2016-06-08 12:13  zhaocundang  阅读(281)  评论(0编辑  收藏  举报