码迷,mamicode.com
首页 > 其他好文 > 详细

Fragment传值

时间:2017-05-24 16:12:39      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:err   new   generate   fragment   bundle   bsp   override   auto   his   

     

AirplaneOrderFragment mFragment = new AirplaneOrderFragment();
Bundle mBundle = new Bundle();
mBundle.putInt("type", i);
mFragment.setArguments(mBundle);

 

在Fragment里得到值

@Override
public void onAttach(Activity activity) {
// TODO Auto-generated method stub
super.onAttach(activity);
Bundle mBundle = getArguments();
type = mBundle.getInt("type");
this.activity = activity;
}

Fragment传值

标签:err   new   generate   fragment   bundle   bsp   override   auto   his   

原文地址:http://www.cnblogs.com/heke-heke/p/6898966.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!