0
내 앱 사용 약관을 보여주는 알림 대화 상자를 만들려고합니다. 2 개의 버튼을 추가했습니다 : 하나의 버튼은 "동의 함"이고 다른 하나는 "거부"입니다.android - 사용자가 버튼을 클릭하지 않고도 전달할 수없는 경고 대화 상자
문제는 다음과 같습니다. 사용자가 대화 상자 외부의 화면을 클릭하기 만하면 사용 조건에 동의하지 않고 대화 상자를 전달할 수 있습니다. 예방할 수 있습니까?
AlertDialog.Builder dialog = new AlertDialog.Builder(MainActivity.this);
dialog.setTitle("הבהרה");
dialog.setMessage("המידע באפליקציה זו מובא כמו שהוא, אחריות השימוש בו חלה על הקורא בלבד. האפליקציה לא מהווה תחליף ליעוץ רפואי או/ו יעוץ מקצועי. מטרת התכנים באפליקציה היא סיפוק מידע כללי ואינה המלצה או/ו הצעה רפואית. לקורא לא תהיה שום תביעה או תלונה כלפי המפתחים. ");
dialog.setPositiveButton("מסכים",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int id) {
dialog.cancel();
}
});
dialog.setNegativeButton("לא מסכים",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int id) {
Intent intent5 = new Intent(MainActivity.this,Splash.class);
startActivity(intent5);
dialog.cancel();
}
});
AlertDialog alertDialog = dialog.create();
alertDialog.show();
dialog.setCancelable (false); – zgc7009