File tree Expand file tree Collapse file tree
app/src/main/java/xtr/keymapper/editor/component Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import android .annotation .SuppressLint ;
44import android .content .Context ;
55import android .os .Build ;
6+ import android .os .Handler ;
7+ import android .os .Looper ;
68import android .view .MotionEvent ;
79import android .view .View ;
810import android .view .ViewGroup ;
@@ -74,15 +76,15 @@ private void onExpandButtonClicked(View view) {
7476 profile .mouseAimConfig .height = 0 ;
7577 if (which == 0 ) {
7678 profile .mouseAimConfig .limitedBounds = true ;
77- new ResizableArea ();
79+ // Delay for 100ms to skip layout changes
80+ new Handler (Looper .getMainLooper ()).postDelayed (ResizableArea ::new , 100 );
7881 } else {
7982 profile .mouseAimConfig .limitedBounds = false ;
8083 }
8184 });
8285 AlertDialog dialog = builder .create ();
8386 if (getCallback ().isOverlayOpen ()) dialog .getWindow ().setType (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ? WindowManager .LayoutParams .TYPE_APPLICATION_OVERLAY : WindowManager .LayoutParams .TYPE_SYSTEM_ALERT );
8487 dialog .show ();
85-
8688 }
8789
8890 private MovableFloatingActionKey addLeftClick (float x , float y ) {
You can’t perform that action at this time.
0 commit comments