From 480113108e199144afa0bb39c9cb71db1647ff02 Mon Sep 17 00:00:00 2001 From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:51:19 +0530 Subject: [PATCH] revert --- .../panda3ds/pandroid/app/GameActivity.java | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/GameActivity.java b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/GameActivity.java index 5806d646a..aced6faad 100644 --- a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/GameActivity.java +++ b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/GameActivity.java @@ -2,7 +2,6 @@ import android.content.Intent; import android.os.Bundle; -import android.view.GestureDetector; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; @@ -23,10 +22,9 @@ import com.panda3ds.pandroid.view.PandaGlSurfaceView; import com.panda3ds.pandroid.view.PandaLayoutController; -public class GameActivity extends BaseActivity implements GestureDetector.OnGestureListener { +public class GameActivity extends BaseActivity { private final DrawerFragment drawerFragment = new DrawerFragment(); private final AlberInputListener inputListener = new AlberInputListener(this::onBackPressed); - private GestureDetector gestureDetector; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { @@ -60,28 +58,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { getSupportFragmentManager().beginTransaction().replace(R.id.drawer_fragment, drawerFragment).commitNow(); } - // Initialize gesture detector - @Override - public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { - float distanceX = e2.getX() - e1.getX(); - float distanceY = e2.getY() - e1.getY(); - if (Math.abs(distanceX) > Math.abs(distanceY) && distanceX > 0) { - //// Open the drawer when swiping from left to right - if (drawerFragment.isOpened()) { - } else { - drawerFragment.open(); - } - return true; - } - return false; -} - - @Override - public boolean dispatchTouchEvent(MotionEvent ev) { - gestureDetector.onTouchEvent(ev); - return super.dispatchTouchEvent(ev); - } - @Override protected void onResume() { super.onResume();