public class agetest extends Dialog implements OnClickListener {
EditText edit1, edit2;
Button allremove, remove, complete;
TextView textResult;
Integer result;
Button exit;
String num1, num2;
int i;
int length;
public static int j;
.
.
.
. 생략
.
.
public void onClick(View v) {
// 확인 버튼을 클릭하면 입력한 값을 적절히 설정한 후 다이얼로그를 닫음
// 취소 버튼을 클릭하면 단순히 다이얼로그를 닫음
if(v == allremove){ // 정정 //
num1=null;
textResult.setText(num1);
}
if (v == exit){
dismiss(); // 이후 MainActivity에서 구현해준 Dismiss와 Cancel 리스너가 작동함
}
if(v == remove){
length=num1.length();
if(length>0){
textResult.setText(num1.substring(0, num1.length()-1));
}
}
if(v==complete){
j=Integer.valueOf(num1);
Intent main_Season=new Intent(getApplicationContext(),main_season.class);
mainmenu.this.startActivity(main_Season);
}
}
}
안녕하세요. 안드로이드를 이제 막배우기 시작했는데..
다름이아니라.
현재 호출한 커스텀다이얼로그에서 입력값을 받고 complete 버튼을 누르면
입력값을 전역변수에 저장한후 다음 액티비티로 넘어가려고합니다..
다른 액티비티에서는 위 빨간 명령어를 넣어주면 별 문제없이 액티비티가 이동되는데,
이상하게 커스텀다이얼로그에서는 저 명령어가 안먹히네요..
혹시 대체할 명령어가 있는지요?
현재 이것때문에 몇시간째 골머리썩히는중입니다. ㅠㅠ 도와주세요..