안드로이드 개발 질문/답변
(글 수 45,052)
Popupwindow 자체는 잘 되는데, 문제는
EditText랑 조합이 되면 이게 맛이 갑니다.
EditText에 포커스가 간후 softkeyinput(키패드)를 아무거나 친후,
다시 EditText를 터치하면, 뻣는데
is you activity is running 이라고 나오고 view가 null 이라는데, 음...왜그런걸까요.
누가 한번 popupwindow + edittext로 간단히 한번 테스트해보실분 없나요.
부탁드려요~
-----------------------------------------
final PopupWindow popup = new PopupWindow(this);
popup.setTouchInterceptor(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent e) {
if (e.getAction() == MotionEvent.ACTION_OUTSIDE) {
popup.dismiss();
return true;
}
return false;
}
});
popup.setWidth(WindowManager.LayoutParams.FILL_PARENT);
popup.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
popup.setTouchable(true);
popup.setFocusable(true);
popup.setOutsideTouchable(true);
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View root = inflater.inflate(R.layout.quick_search, null, false);
popup.setContentView(root);
//
popup.showAtLocation(this.findViewById(R.id.LinearLayoutFLBottom), Gravity.TOP, 0, 38);
2011.03.16 23:02:29
(추천:
1 / 0)
PopupWindow 위에 다시 윈도우가 올라가게 되면 액티브 액티비티를 못찾아서 Exception이 일어납니다.
진저브레드의 EditText 핸들러도 그런지는 모르겠지만 삼성의 갤럭시탭에 보면 EditText가 활성화 되었을때 한번더 누르게 되면 커서 핸들러가 뜨는데 이때 Exception이 일어나죠 여러방면으로 찾아보았는데 그냥 PopupWindow위에 EditText를 안쓰던지 진저브레드에서 해당 Exception이 나오면 핸들러를 꺼야 할듯 싶습니다. 삼성기기라면 딱히 떠오르질 않네요 이건 자체적으로 만들어논거라 끌수있는 방법이 없으니



