安卓程序开发代码求解

实现登录后显示用户名的效果,输入用户名和密码登录,启动一个新的Activity显示用户名。求解代码

// 第一个页面跳转带用户名和密码
Intent intent = new Intent(this, xxxx.class); 
Bundle bundle = new Bundle();
bundle.putString("name", "user");
bundle.putString("pwd", "123456");
intent.putExtras(bundle);
startActivity(intent);

// 第二个页面取出参数
Bundle bundle = this.getIntent().getExtras();  
String name = bundle.getString("name");  
String pwd= bundle.getString("pwd");

自己去网上搜啊
一大堆登录功能博客。