너무 두리뭉술하게 질문한것 같아, 제가 한 방법을 올려봅니다. 조언 부탁드립니다..
메인에서 서브 dialog를 띄우는데 매니페스트 쪽에선
<activity
android:name=:"my.may.test.sub"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Dialog" >
이런식으로 설정을 잡고,
메인에서 버튼을 눌러서 서브로 넘어갈 때엔 버튼 이벤트에
Intent intent = new Intent(main.this, subclass);
startActivity(intent); 이렇게 했습니다.
구글링을 참고해서 sub 쪽에서는
@Override
protected void onApplyThemeResource(Theme theme, int resid, boolean first) {
// TODO Auto-generated method stub
super.onApplyThemeResource(theme, resid, first);
theme.applyStyle(android.R.style.Theme_Panel, true);
}
이런식으로 했더니 예전에는 전체 크기만큼 나왔던 서브 페이지 크기가 좀 줄어서 나왔는데요..
문제는 backbutton을 누르지 않는 이상 sub이외의 영역을 눌러도 꺼짐 반응이 없습니다.
서브 영역 이외를 누르면 finish()되게끔 하고싶습니다.
다른 dialog들 예제도 몇번 공부했을 때엔 오히려 외부영역터치해도 안꺼지게끔 하는 설정까지 했었는데,
이번 코드는 처음보는 코드라 많이 헤매게 되었습니다 ㅠㅠ .....
그냥 예전 dialog로 만들까 하는데 theme applystyle? 이렇게 다이얼로그를 구현할 때엔 방법이 없는지요..?
긴글 읽어주셔서 감사합니다.