안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요
완전 초보 개발자 입니다. 질문하나 하겠습니다.
case R.id.MakeButton:
if(event.getAction() == MotionEvent.ACTION_DOWN){
}else if(event.getAction() == MotionEvent.ACTION_UP){
db = iHelper.getReadableDatabase();
Cursor cursor = null;
cursor = db.rawQuery("select 즐거움 from feel1 where 남성=1", null);
- eText.setText(cursor); <-----이 부분...
}
버튼을 누르면 db에있는 값을 가져와서 editText에 띄워 볼려고 하는데요. cursor를 CharSequence로 casting 해야되더라구요.
근데 casting해서 error없이 돌려보면 버튼 클릭시 LogCat에 casting Exception이 나더라구요....
어찌해야하나요.......ㅠㅠ