本尊他们透……桌子方诗双改成$关闭当前页面A,然后跳转到下一个Activity B即可。A.finish();Intent intentToG0=new Intent(A.this,B.class);startActivity(intentToGo);
贫道丁友梅蹲下来·私猫慌#Android中在不同Activity中传递变量,通常使用Intent中Bundle添加变量的操作方法。保存参数代码如下:Intent intent = new Intent();intent.setClass(A.this, B.class);Bundle bundle = new Bundle();bundle.putString("name", "xiaozhu");intent.putExtras(bundle);startActivity(intent);读取参数: Intent intent = this.getIntent();Bundle bundle = intent.getExtras();String name = bundle.getString("name");
|