`
whoisandroid
  • 浏览: 30139 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
最近访客 更多访客>>
社区版块
存档分类
最新评论

Intent Bundle

 
阅读更多
setdata
Intent intent = new Intent();
                intent.setClass(Bmi.this, Report.class);
                Bundle bundle = new Bundle();
                bundle.putString("KEY_HEIGHT", field_height.getText().toString());
                bundle.putString("KEY_WEIGHT", field_weight.getText().toString());
                intent.putExtras(bundle);
                startActivity(intent);
getdata
Bundle bunde = this.getIntent().getExtras();
        double height = Double.parseDouble(bunde.getString("KEY_HEIGHT"))/100;
        double weight = Double.parseDouble(bunde.getString("KEY_WEIGHT"));
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics