Revision 85248b04
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/dialogs/RubikDialogSolved.java | ||
---|---|---|
40 | 40 |
|
41 | 41 |
public class RubikDialogSolved extends AppCompatDialogFragment |
42 | 42 |
{ |
43 |
@Override |
|
44 |
public void onStart() |
|
45 |
{ |
|
46 |
super.onStart(); |
|
47 |
|
|
48 |
Dialog dialog = getDialog(); |
|
49 |
|
|
50 |
if( dialog!=null ) |
|
51 |
{ |
|
52 |
dialog.setCanceledOnTouchOutside(false); |
|
53 |
|
|
54 |
Window window = dialog.getWindow(); |
|
55 |
|
|
56 |
if( window!=null ) |
|
57 |
{ |
|
58 |
window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); |
|
59 |
} |
|
60 |
} |
|
61 |
} |
|
62 |
|
|
63 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
64 |
|
|
65 | 43 |
@NonNull |
66 | 44 |
@Override |
67 | 45 |
public Dialog onCreateDialog(Bundle savedInstanceState) |
... | ... | |
102 | 80 |
text.setText(getString(R.string.ti_placeholder, (time/100)/10.0f)); |
103 | 81 |
builder.setView(view); |
104 | 82 |
|
105 |
return builder.create(); |
|
83 |
Dialog dialog = builder.create(); |
|
84 |
|
|
85 |
dialog.setCanceledOnTouchOutside(false); |
|
86 |
|
|
87 |
Window window = dialog.getWindow(); |
|
88 |
|
|
89 |
if( window!=null ) |
|
90 |
{ |
|
91 |
window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); |
|
92 |
} |
|
93 |
|
|
94 |
return dialog; |
|
106 | 95 |
} |
107 | 96 |
} |
Also available in: Unified diff
Finally solve the bug on Samsung Android 9 and 10 phones that the Dialogs Main & patterns wouldn't be modeless: move the setting of this flag earlier, to the 'onCreateDialog()' function.