mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 11:02:35 +01:00
Merge pull request #6637 from Isira-Seneviratne/Use_GestureDetectorCompat
Use GestureDetectorCompat.
This commit is contained in:
commit
a932bc2503
@ -27,7 +27,6 @@ import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
@ -56,6 +55,7 @@ import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.appcompat.widget.AppCompatImageButton;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.view.DisplayCutoutCompat;
|
||||
import androidx.core.view.GestureDetectorCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
@ -125,10 +125,10 @@ import org.schabi.newpipe.player.resolver.MediaSourceTag;
|
||||
import org.schabi.newpipe.player.resolver.VideoPlaybackResolver;
|
||||
import org.schabi.newpipe.util.DeviceUtils;
|
||||
import org.schabi.newpipe.util.ImageDisplayConstants;
|
||||
import org.schabi.newpipe.util.external_communication.KoreUtils;
|
||||
import org.schabi.newpipe.util.ListHelper;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
import org.schabi.newpipe.util.SerializedCache;
|
||||
import org.schabi.newpipe.util.external_communication.KoreUtils;
|
||||
import org.schabi.newpipe.util.external_communication.ShareUtils;
|
||||
import org.schabi.newpipe.views.ExpandableSurfaceView;
|
||||
|
||||
@ -356,7 +356,7 @@ public final class Player implements
|
||||
private static final float MAX_GESTURE_LENGTH = 0.75f;
|
||||
|
||||
private int maxGestureLength; // scaled
|
||||
private GestureDetector gestureDetector;
|
||||
private GestureDetectorCompat gestureDetector;
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
// Listeners and disposables
|
||||
@ -520,7 +520,7 @@ public final class Player implements
|
||||
binding.playbackLiveSync.setOnClickListener(this);
|
||||
|
||||
final PlayerGestureListener listener = new PlayerGestureListener(this, service);
|
||||
gestureDetector = new GestureDetector(context, listener);
|
||||
gestureDetector = new GestureDetectorCompat(context, listener);
|
||||
binding.getRoot().setOnTouchListener(listener);
|
||||
|
||||
binding.queueButton.setOnClickListener(this);
|
||||
@ -4132,7 +4132,7 @@ public final class Player implements
|
||||
return audioReactor;
|
||||
}
|
||||
|
||||
public GestureDetector getGestureDetector() {
|
||||
public GestureDetectorCompat getGestureDetector() {
|
||||
return gestureDetector;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user