안녕하세요 아직 초보라 문제가 많이 발생하네요.
editText에서 버튼을 누르면 값을 받아서 Thread를 실행시키고 싶은데요.
자꾸만 에러가 납니다.
bt = (Button)findViewById(R.id.button1);
edit = (EditText)findViewById(R.id.editText1);
bt.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
strText = edit.getText().toString();
MyThread th = new MyThread(strText);
th.isDaemon();
th.start();
}
});
실행시켜서 버튼을 누르면 하면 예상치 않게 중지되었습니다.가 뜨는데 버튼 리스너안에서 Thread실행을 시킬수는 없나요??