본문 바로가기

Back-end/Android28

[Android] 비밀번호 체크하기 etPasswordConfirm.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { String password = etPassword.getText().toString(); String confirm = etPasswordConfirm.getText().toString(); if(password.equals(confirm)){ etPassword.setBack.. 2016. 6. 9.
[Android] 다른화면에서 값갖고 돌아오기 메인페이지에서 회원가입 버튼을 누른 요청을 Intent를 통해 넘기고 받아온다.이때 1000은 데이터를 돌려받을 때 1000번으로 보낸다는 뜻이다.1000은 요청에 대한 식별자 역할을 한다. 회원가입에서 적은 값을log.d를 이용해 로그캣에 찍어본다. 실행코드 : 1000결과코드 : RESULT_OKdata : Email이 옳바르게 들어가 있는 것을 확인할 수 있다. 만약 요청 코드가 1000이고 결과 코드가 RESULT_OK가 맞을 경우etEmail에 회원가입한 메일을 적는다. 2016. 6. 9.
[Android] 회원가입 화면 만들기 android:layout_height="wrap_content"내부 컨텐츠 크기에 맞게 android:layout_width="match_parent"부모 컨텐츠 크기에 맞게 android:layout_weight="1"겉 레이아웃에 딱맞게 소스: 2016. 6. 9.
[Android] 버튼으로 다른화면 이동하기 Intent 준비 1 - Main-Sub Life Cycle Activity1 : onPause Activity2 : onCreate Activity1 : onStop 준비 2 새로운 Activity를 띄울때 Intent를 사용한다. 먼저 새로운 Activity를 만들어 줍니다. 그 이름은 SubActivity로 하겠습니다. 그러면 자동으로 Manifest에 subActivity가 추가됩니다. layout에서도 자동으로 추가되었습니다. activity_main에서 TextView를 버튼으로 바꿔줍니다. 이렇게 바꿔주고 아이디를 newActivity로 줬습니다. 버튼을 클릭할때 Intent를 이용하여 SubActivity로 넘겨줍니다. 결과화면 Hello World 버튼을 누르면 새로운 창으로 넘어갑니다. 아까 int.. 2016. 6. 8.