请选择 进入手机版 | 继续访问电脑版
 找回密码
 立即注册
首页 社区 移动 android登陆时如何获取登录名并将其显示在跳转后的页面 ...

android登陆时如何获取登录名并将其显示在跳转后的页面上?

猿梦 2022-11-19 16:20:14
本尊他们透……桌子方诗双改成$关闭当前页面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");

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册