mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-09 20:51:37 -04:00
Style[gestures]: rename method to getGestureDelay
This commit is contained in:
parent
93924b429b
commit
dd15d8a469
@ -28,7 +28,7 @@ public class LeftClickGesture extends ValidatorGesture {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getCheckDuration() {
|
protected int getGestureDelay() {
|
||||||
return LauncherPreferences.PREF_LONGPRESS_TRIGGER;
|
return LauncherPreferences.PREF_LONGPRESS_TRIGGER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ public class RightClickGesture extends ValidatorGesture {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getCheckDuration() {
|
protected int getGestureDelay() {
|
||||||
return 150;
|
return 150;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public abstract class ValidatorGesture implements Runnable{
|
|||||||
*/
|
*/
|
||||||
public final boolean submit() {
|
public final boolean submit() {
|
||||||
if(mGestureActive) return false;
|
if(mGestureActive) return false;
|
||||||
mHandler.postDelayed(this, getCheckDuration());
|
mHandler.postDelayed(this, getGestureDelay());
|
||||||
mGestureActive = true;
|
mGestureActive = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -55,10 +55,10 @@ public abstract class ValidatorGesture implements Runnable{
|
|||||||
* This method will be called during gesture submission to determine the gesture check duration.
|
* This method will be called during gesture submission to determine the gesture check duration.
|
||||||
* @return the required gesture check duration in milliseconds
|
* @return the required gesture check duration in milliseconds
|
||||||
*/
|
*/
|
||||||
protected abstract int getCheckDuration();
|
protected abstract int getGestureDelay();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will be called after getCheckDuration() milliseconds, if the gesture was not cancelled.
|
* This method will be called after getGestureDelay() milliseconds, if the gesture was not cancelled.
|
||||||
* @return false if you want to mark this gesture as "inactive"
|
* @return false if you want to mark this gesture as "inactive"
|
||||||
* true otherwise
|
* true otherwise
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user