메인페이지 A에서 로그인폼 ID.PW 를 입력한 후에 서버랑 통신하고 값 받고 그담 페이지로 넘겨주는게 됬습니다.
그리고 B라는 페이지에서 안드로이드 BACK KEY 를 누르게되면 이전 A엑티비티로 가는데 로그인폼에 ID.PW가 그대로
남아있습니다. 이것을 원래 처음 빈칸으로 만들고싶은데 어떤식으로 해야하나요? 소스 첨부하겠습니다.
A에서 B로 이동할때 소스입니다.
if (oksign.equals("OK")) {
Intent i = new Intent(MainActivity.this, Notice.class);
startActivity(i);
Toast.makeText(this, "로그인 되었습니다.", Toast.LENGTH_SHORT).show();
}
B에서 백키 소스 입니다.
@Override
public void onBackPressed() {
if (mIsBackKeyPressed == false) {
mIsBackKeyPressed = true;
mCurrentTimeInMillis = Calendar.getInstance().getTimeInMillis();
Toast.makeText(this, "두번 클릭하면 어플이 종료됩니다.", Toast.LENGTH_SHORT)
.show();
startTimer();
} else {
mIsBackKeyPressed = false;
if (Calendar.getInstance().getTimeInMillis() <= (mCurrentTimeInMillis + (BACKEY_TIMEOUT))) {
finish();
}
}
}
private void startTimer() {
mTimerHander.sendEmptyMessageDelayed(MSG_TIMER_EXPIRED, BACKEY_TIMEOUT);
}
private Handler mTimerHander = new Handler() {
public void handleMessage(Message msg) {
switch (msg.what) {
case MSG_TIMER_EXPIRED:
{
mIsBackKeyPressed = false;
}
break;
}
}
};