Project

General

Profile

« Previous | Next » 

Revision 85248b04

Added by Leszek Koltunski about 4 years ago

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.

View differences:

src/main/java/org/distorted/dialogs/RubikDialogEffects.java
49 49
  {
50 50
  private TextView[] mDurationText;
51 51

  
52
///////////////////////////////////////////////////////////////////////////////////////////////////
53

  
54
  @Override
55
  public void onStart()
56
    {
57
    super.onStart();
58

  
59
    Dialog dialog = getDialog();
60

  
61
    if( dialog!=null )
62
      {
63
      dialog.setCanceledOnTouchOutside(false);
64

  
65
      Window window = dialog.getWindow();
66

  
67
      if( window!=null )
68
        {
69
        window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
70
        }
71
      }
72
    }
73

  
74 52
///////////////////////////////////////////////////////////////////////////////////////////////////
75 53

  
76 54
  private void addSettingsSection(FragmentActivity act, LinearLayout layout, int index)
......
259 237
      android.util.Log.e("dialog_settings", "linearLayout NULL!");
260 238
      }
261 239

  
262
    return builder.create();
240
    Dialog dialog = builder.create();
241

  
242
    dialog.setCanceledOnTouchOutside(false);
243

  
244
    Window window = dialog.getWindow();
245

  
246
    if( window!=null )
247
      {
248
      window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
249
      }
250

  
251
    return dialog;
263 252
    }
264 253

  
265 254
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff