我有两个活动,其中一个是登录活动,当登录成功时,我必须使图标在第二个活动中可见最初我使图标在第二个活动的布局文件中不可见..下面是我的代码
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fyelogin);
etPassword = (EditText)findViewById(R.id.password);
btnLogin = (Button)findViewById(R.id.login_button);
btnCancel = (Button)findViewById(R.id.cancel_button);
lblResult = (TextView)findViewById(R.id.result);
final ImageView details = (ImageView)findViewById(R.id.red);
btnLogin.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
String password = etPassword.getText().toString();
if(password.equals("guest")){
lblResult.setText("password successful.");
// details.setVisibility(View.VISIBLE);
} else {
lblResult.setText("password doesn't match.");
}
finish();}});
我很震惊,我怎样才能调用第二个活动并使登录活动中的图标可见..任何建议表示赞赏