我有兩個活動其中之一是登錄活動,當登錄成功時,我必須在第二個活動中顯示一個圖標,最初我讓該圖標在佈局文件中不可見第二項活動的..below是我的代碼Android:使圖標在登錄後可見活動成功
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();}});
我我打,我怎麼能叫的第二個活動,使圖標可見從登錄activity..Any的建議表示讚賞
在你把活動
如何使用意圖調用第二胡亞蓉並使用'Intent.putExtra(布爾驗證)'告訴第二個靈活性,如果登錄成功? –
iam觸發監聽器的登錄活動...這個監聽器在一個適配器中使用.. – teekib